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 | bitsInQueuebitsInQueue. |
protected byte[] | dataQueuedataQueue. |
protected int | fixedOutputLengthfixedOutputLength. |
protected CryptoServicePurpose | purposepurpose. |
protected int | raterate. |
protected boolean | squeezingsqueezing. |
protected long[] | statestate. |
| Constructor and Description |
|---|
KeccakDigest()KeccakDigest. |
KeccakDigest(CryptoServicePurpose purpose)KeccakDigest. |
KeccakDigest(int bitLength)KeccakDigest. |
KeccakDigest(int bitLength,
CryptoServicePurpose purpose)KeccakDigest. |
KeccakDigest(KeccakDigest source)KeccakDigest. |
| Modifier and Type | Method and Description |
|---|---|
protected void | absorb(byte data)absorb. |
protected void | absorb(byte[] data,
int off,
int len)absorb. |
protected void | absorbBits(int data,
int bits)absorbBits. |
protected CryptoServiceProperties | cryptoServiceProperties()cryptoServiceProperties. |
int | doFinal(byte[] out,
int outOff)doFinal. |
protected int | doFinal(byte[] out,
int outOff,
byte partialByte,
int partialBits)doFinal. |
String | getAlgorithmName()getAlgorithmName. |
int | getByteLength()Return the size of block that the compression function is applied to in bytes. |
int | getDigestSize()getDigestSize. |
void | reset()reset. |
protected void | squeeze(byte[] output,
int offset,
long outputLength)squeeze. |
void | update(byte in)update. |
void | update(byte[] in,
int inOff,
int len)update. |
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)protected int doFinal(byte[] out,
int outOff,
byte partialByte,
int partialBits)public String getAlgorithmName()
getAlgorithmName in interface Digestpublic int getByteLength()
getByteLength in interface ExtendedDigestpublic int getDigestSize()
getDigestSize in interface Digestprotected void squeeze(byte[] output,
int offset,
long outputLength)public void update(byte in)