|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.crypto.digests.KeccakDigest
implementation of Keccak based on following KeccakNISTInterface.c from https://keccak.noekeon.org/
Following the naming conventions used in the C source code to enable easy review of the implementation.
Field Summary | |
protected int |
bitsInQueue
|
protected byte[] |
dataQueue
|
protected int |
fixedOutputLength
|
protected CryptoServicePurpose |
purpose
|
protected int |
rate
|
protected boolean |
squeezing
|
protected long[] |
state
|
Constructor Summary | |
KeccakDigest()
|
|
KeccakDigest(CryptoServicePurpose purpose)
|
|
KeccakDigest(int bitLength)
|
|
KeccakDigest(int bitLength,
CryptoServicePurpose purpose)
|
|
KeccakDigest(KeccakDigest source)
|
Method Summary | |
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)
|
java.lang.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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final CryptoServicePurpose purpose
protected long[] state
protected byte[] dataQueue
protected int rate
protected int bitsInQueue
protected int fixedOutputLength
protected boolean squeezing
Constructor Detail |
public KeccakDigest()
public KeccakDigest(CryptoServicePurpose purpose)
public KeccakDigest(int bitLength)
public KeccakDigest(int bitLength, CryptoServicePurpose purpose)
public KeccakDigest(KeccakDigest source)
Method Detail |
public java.lang.String getAlgorithmName()
Digest
getAlgorithmName
in interface Digest
public int getDigestSize()
Digest
getDigestSize
in interface Digest
public void update(byte in)
Digest
update
in interface Digest
in
- the input byte to be entered.public void update(byte[] in, int inOff, int len)
Digest
update
in interface Digest
in
- the byte array containing the data.inOff
- the offset into the byte array where the data starts.len
- the length of the data.public int doFinal(byte[] out, int outOff)
Digest
doFinal
in interface Digest
out
- the array the digest is to be copied into.outOff
- the offset into the out array the digest is to start at.protected int doFinal(byte[] out, int outOff, byte partialByte, int partialBits)
public void reset()
Digest
reset
in interface Digest
public int getByteLength()
getByteLength
in interface ExtendedDigest
protected void absorb(byte data)
protected void absorb(byte[] data, int off, int len)
protected void absorbBits(int data, int bits)
protected void squeeze(byte[] output, int offset, long outputLength)
protected CryptoServiceProperties cryptoServiceProperties()
|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |