public class KeccakDigest extends Object implements ExtendedDigest
Following the naming conventions used in the C source code to enable easy review of the implementation.
| Modifier and Type | Field and Description |
|---|---|
protected int |
bitsInQueue |
protected byte[] |
dataQueue |
protected int |
fixedOutputLength |
protected CryptoServicePurpose |
purpose |
protected int |
rate |
protected boolean |
squeezing |
protected long[] |
state |
| Constructor and Description |
|---|
KeccakDigest() |
KeccakDigest(CryptoServicePurpose purpose) |
KeccakDigest(int bitLength) |
KeccakDigest(int bitLength,
CryptoServicePurpose purpose) |
KeccakDigest(KeccakDigest source) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
absorb(byte data) |
protected void |
absorb(byte[] data,
int off,
int len) |
protected void |
absorbBits(int data,
int bits) |
protected CryptoServiceProperties |
cryptoServiceProperties() |
int |
doFinal(byte[] out,
int outOff)
close the digest, producing the final digest value.
|
protected int |
doFinal(byte[] out,
int outOff,
byte partialByte,
int partialBits) |
String |
getAlgorithmName()
return the algorithm name
|
int |
getByteLength()
Return the size of block that the compression function is applied to in bytes.
|
int |
getDigestSize()
return the size, in bytes, of the digest produced by this message digest.
|
void |
reset()
reset the digest back to it's initial state.
|
protected void |
squeeze(byte[] output,
int offset,
long outputLength) |
void |
update(byte in)
update the message digest with a single byte.
|
void |
update(byte[] in,
int inOff,
int len)
update the message digest with a block of bytes.
|
protected int bitsInQueue
protected byte[] dataQueue
protected int fixedOutputLength
protected final CryptoServicePurpose purpose
protected int rate
protected boolean squeezing
protected long[] state
public KeccakDigest()
public KeccakDigest(CryptoServicePurpose purpose)
public KeccakDigest(int bitLength)
public KeccakDigest(int bitLength,
CryptoServicePurpose purpose)
public KeccakDigest(KeccakDigest source)
protected void absorb(byte data)
protected void absorb(byte[] data,
int off,
int len)
protected void absorbBits(int data,
int bits)
protected CryptoServiceProperties cryptoServiceProperties()
public int doFinal(byte[] out,
int outOff)
Digestprotected int doFinal(byte[] out,
int outOff,
byte partialByte,
int partialBits)
public String getAlgorithmName()
DigestgetAlgorithmName in interface Digestpublic int getByteLength()
getByteLength in interface ExtendedDigestpublic int getDigestSize()
DigestgetDigestSize in interface Digestpublic void reset()
Digestprotected void squeeze(byte[] output,
int offset,
long outputLength)
public void update(byte in)
Digestpublic void update(byte[] in,
int inOff,
int len)
Digest