Package org.bouncycastle.crypto.digests
Class SHA3NativeDigest
java.lang.Object
org.bouncycastle.crypto.digests.SHA3NativeDigest
- All Implemented Interfaces:
Digest,EncodableDigest,EncodableService,ExtendedDigest,SavableDigest,Memoable
SHA3 implementation.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSHA3NativeDigest(byte[] encoded) SHA3NativeDigest(byte[] encoded, CryptoServicePurpose purpose) SHA3NativeDigest(int bitLen) SHA3NativeDigest(int bitLen, CryptoServicePurpose purpose) SHA3NativeDigest(CryptoServicePurpose purpose) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Produce a copy of this object with its configuration and in its current state.protected CryptoServicePropertiesintdoFinal(byte[] output, int outOff) close the digest, producing the final digest value.return the algorithm nameintReturn the size in bytes of the internal buffer the digest applies it's compression function to.intreturn the size, in bytes, of the digest produced by this message digest.byte[]Return an encoded byte array for the digest's internal statevoidreset()reset the digest back to it's initial state.voidRestore a copied object state into this object.toString()voidupdate(byte in) update the message digest with a single byte.voidupdate(byte[] input, int inOff, int len) update the message digest with a block of bytes.
-
Field Details
-
nativeRef
-
-
Constructor Details
-
SHA3NativeDigest
-
SHA3NativeDigest
-
SHA3NativeDigest
public SHA3NativeDigest(int bitLen) -
SHA3NativeDigest
public SHA3NativeDigest() -
SHA3NativeDigest
-
SHA3NativeDigest
-
SHA3NativeDigest
public SHA3NativeDigest(byte[] encoded)
-
-
Method Details
-
getAlgorithmName
Description copied from interface:Digestreturn the algorithm name- Specified by:
getAlgorithmNamein interfaceDigest- Returns:
- the algorithm name
-
getDigestSize
public int getDigestSize()Description copied from interface:Digestreturn the size, in bytes, of the digest produced by this message digest.- Specified by:
getDigestSizein interfaceDigest- Returns:
- the size, in bytes, of the digest produced by this message digest.
-
update
public void update(byte in) Description copied from interface:Digestupdate the message digest with a single byte. -
update
public void update(byte[] input, int inOff, int len) Description copied from interface:Digestupdate the message digest with a block of bytes. -
doFinal
public int doFinal(byte[] output, int outOff) Description copied from interface:Digestclose the digest, producing the final digest value. The doFinal call leaves the digest reset. -
reset
public void reset()Description copied from interface:Digestreset the digest back to it's initial state. -
getByteLength
public int getByteLength()Description copied from interface:ExtendedDigestReturn the size in bytes of the internal buffer the digest applies it's compression function to.- Specified by:
getByteLengthin interfaceExtendedDigest- Returns:
- byte length of the digests internal buffer.
-
copy
Description copied from interface:MemoableProduce a copy of this object with its configuration and in its current state.The returned object may be used simply to store the state, or may be used as a similar object starting from the copied state.
-
reset
Description copied from interface:MemoableRestore a copied object state into this object.Implementations of this method should try to avoid or minimise memory allocation to perform the reset.
-
getEncodedState
public byte[] getEncodedState()Description copied from interface:EncodableDigestReturn an encoded byte array for the digest's internal state- Specified by:
getEncodedStatein interfaceEncodableDigest- Specified by:
getEncodedStatein interfaceEncodableService- Returns:
- an encoding of the digests internal state.
-
toString
-
cryptoServiceProperties
-