Top Description Fields Constructors Methods
org.bouncycastle.crypto.fips

pack-priv abstract Class LongDigest

extends Object
implements ExtendedDigest, Memoable
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.Memoable, org.bouncycastle.crypto.internal.ExtendedDigest, org.bouncycastle.crypto.internal.Digest
Known Direct Subclasses
org.bouncycastle.crypto.fips.SHA384Digest, org.bouncycastle.crypto.fips.SHA512Digest, org.bouncycastle.crypto.fips.SHA512tDigest
Imports
org.bouncycastle.crypto.internal.ExtendedDigest, org.bouncycastle.util.Memoable, .Pack

Base class for SHA-384 and SHA-512.

Field Summary

Modifier and TypeField and Description
private static final int
private long
private long
protected long
protected long
protected long
protected long
protected long
protected long
protected long
protected long
pack-priv static final long[]
K

private long[]
W

private int
private byte[]
private int

Constructor Summary

AccessConstructor and Description
protected
LongDigest()

Constructor for variable length word

protected
LongDigest(LongDigest t)

Copy constructor.

Method Summary

Modifier and TypeMethod and Description
private void
adjustByteCounts()

adjust the byte counts so that byteCount2 represents the upper long (less 3 bits) word of the byte count.

private long
Ch(long x, long y, long z)

protected void
public void
public int
getByteLength()

Implements org.bouncycastle.crypto.internal.ExtendedDigest.getByteLength.

Return the size in bytes of the internal buffer the digest applies it's compression function to.
private long
Maj(long x, long y, long z)

protected void
protected void
processLength(long lowW, long hiW)

protected void
processWord(byte[] in, int inOff)

public void
reset()

Implements org.bouncycastle.crypto.internal.Digest.reset.

reset the digest back to it's initial state.
private long
Sigma0(long x)

private long
Sigma1(long x)

private long
Sum0(long x)

private long
Sum1(long x)

public void
update(byte
the input byte to be entered.
in
)

Implements org.bouncycastle.crypto.internal.Digest.update.

update the message digest with a single byte.
public void
update(byte[]
the byte array containing the data.
in
,
int
the offset into the byte array where the data starts.
inOff
,
int
the length of the data.
len
)

Implements org.bouncycastle.crypto.internal.Digest.update.

update the message digest with a block of bytes.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BYTE_LENGTHback to summary
private static final int BYTE_LENGTH
byteCount1back to summary
private long byteCount1
byteCount2back to summary
private long byteCount2
H1back to summary
protected long H1
H2back to summary
protected long H2
H3back to summary
protected long H3
H4back to summary
protected long H4
H5back to summary
protected long H5
H6back to summary
protected long H6
H7back to summary
protected long H7
H8back to summary
protected long H8
Kback to summary
pack-priv static final long[] K
Wback to summary
private long[] W
wOffback to summary
private int wOff
xBufback to summary
private byte[] xBuf
xBufOffback to summary
private int xBufOff

Constructor Detail

LongDigestback to summary
protected LongDigest()

Constructor for variable length word

LongDigestback to summary
protected LongDigest(LongDigest t)

Copy constructor. We are using copy constructors in place of the Object.clone() interface as this interface is not supported by J2ME.

Method Detail

adjustByteCountsback to summary
private void adjustByteCounts()

adjust the byte counts so that byteCount2 represents the upper long (less 3 bits) word of the byte count.

Chback to summary
private long Ch(long x, long y, long z)
copyInback to summary
protected void copyIn(LongDigest t)
finishback to summary
public void finish()
getByteLengthback to summary
public int getByteLength()

Implements org.bouncycastle.crypto.internal.ExtendedDigest.getByteLength.

Doc from org.bouncycastle.crypto.internal.ExtendedDigest.getByteLength.

Return the size in bytes of the internal buffer the digest applies it's compression function to.

Returns:int

byte length of the digests internal buffer.

Majback to summary
private long Maj(long x, long y, long z)
processBlockback to summary
protected void processBlock()
processLengthback to summary
protected void processLength(long lowW, long hiW)
processWordback to summary
protected void processWord(byte[] in, int inOff)
resetback to summary
public void reset()

Implements org.bouncycastle.crypto.internal.Digest.reset.

Doc from org.bouncycastle.crypto.internal.Digest.reset.

reset the digest back to it's initial state.

Sigma0back to summary
private long Sigma0(long x)
Sigma1back to summary
private long Sigma1(long x)
Sum0back to summary
private long Sum0(long x)
Sum1back to summary
private long Sum1(long x)
updateback to summary
public void update(byte in)

Implements org.bouncycastle.crypto.internal.Digest.update.

Doc from org.bouncycastle.crypto.internal.Digest.update.

update the message digest with a single byte.

Parameters
in:byte

the input byte to be entered.

updateback to summary
public void update(byte[] in, int inOff, int len)

Implements org.bouncycastle.crypto.internal.Digest.update.

Doc from org.bouncycastle.crypto.internal.Digest.update.

update the message digest with a block of bytes.

Parameters
in:byte[]

the byte array containing the data.

inOff:int

the offset into the byte array where the data starts.

len:int

the length of the data.