public class SHA3Digest extends KeccakDigest implements SavableDigest
Following the naming conventions used in the C source code to enable easy review of the implementation.
bitsInQueue, dataQueue, fixedOutputLength, purpose, rate, squeezing, state
Constructor and Description |
---|
SHA3Digest() |
SHA3Digest(byte[] encoded) |
SHA3Digest(byte[] encoded,
CryptoServicePurpose purpose) |
SHA3Digest(CryptoServicePurpose purpose) |
SHA3Digest(int bitLength) |
SHA3Digest(int bitLength,
CryptoServicePurpose purpose) |
SHA3Digest(SHA3Digest source) |
Modifier and Type | Method and Description |
---|---|
Memoable |
copy()
Produce a copy of this object with its configuration and in its current state.
|
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
|
byte[] |
getEncodedState()
Return an encoded byte array for the digest's internal state
|
static SavableDigest |
newInstance() |
static SavableDigest |
newInstance(byte[] encoded,
CryptoServicePurpose purpose) |
static SavableDigest |
newInstance(CryptoServicePurpose purpose) |
static SavableDigest |
newInstance(Digest digest) |
static SavableDigest |
newInstance(int bitlen) |
static SavableDigest |
newInstance(int bitlen,
CryptoServicePurpose purpose) |
void |
reset(Memoable other)
Restore a copied object state into this object.
|
java.lang.String |
toString() |
absorb, absorb, absorbBits, cryptoServiceProperties, getByteLength, getDigestSize, reset, squeeze, update, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getByteLength
getDigestSize, reset, update, update
public SHA3Digest()
public SHA3Digest(CryptoServicePurpose purpose)
public SHA3Digest(int bitLength)
public SHA3Digest(int bitLength, CryptoServicePurpose purpose)
public SHA3Digest(SHA3Digest source)
public SHA3Digest(byte[] encoded)
public SHA3Digest(byte[] encoded, CryptoServicePurpose purpose)
public static SavableDigest newInstance()
public static SavableDigest newInstance(CryptoServicePurpose purpose)
public static SavableDigest newInstance(int bitlen)
public static SavableDigest newInstance(int bitlen, CryptoServicePurpose purpose)
public static SavableDigest newInstance(Digest digest)
public static SavableDigest newInstance(byte[] encoded, CryptoServicePurpose purpose)
public java.lang.String getAlgorithmName()
Digest
getAlgorithmName
in interface Digest
getAlgorithmName
in class KeccakDigest
public int doFinal(byte[] out, int outOff)
Digest
doFinal
in interface Digest
doFinal
in class KeccakDigest
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)
doFinal
in class KeccakDigest
public byte[] getEncodedState()
EncodableDigest
getEncodedState
in interface EncodableDigest
public Memoable copy()
Memoable
The returned object may be used simply to store the state, or may be used as a similar object starting from the copied state.
public void reset(Memoable other)
Memoable
Implementations of this method should try to avoid or minimise memory allocation to perform the reset.
public java.lang.String toString()
toString
in class java.lang.Object