Top Description Fields Constructors Methods
org.bouncycastle.crypto.digests

public Class SHA3Digest

extends KeccakDigest
Class Inheritance
Imports
org.bouncycastle.crypto.CryptoServicePurpose

implementation of SHA-3 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

Inherited from org.bouncycastle.crypto.digests.KeccakDigest:
bitsInQueuedataQueuefixedOutputLengthpurposeratesqueezingstate

Constructor Summary

AccessConstructor and Description
public
public
public
SHA3Digest(int bitLength)

public
SHA3Digest(int bitLength, CryptoServicePurpose purpose)

public

Method Summary

Modifier and TypeMethod and Description
private static int
checkBitLength(int bitLength)

public int
doFinal(byte[]
the array the digest is to be copied into.
out
,
int
the offset into the out array the digest is to start at.
outOff
)

Overrides org.bouncycastle.crypto.digests.KeccakDigest.doFinal.

Implements org.bouncycastle.crypto.Digest.doFinal.

close the digest, producing the final digest value.
protected int
doFinal(byte[] out, int outOff, byte partialByte, int partialBits)

Overrides org.bouncycastle.crypto.digests.KeccakDigest.doFinal.

public String
Inherited from org.bouncycastle.crypto.digests.KeccakDigest:
absorbabsorbabsorbBitscryptoServicePropertiesgetByteLengthgetDigestSizeresetsqueezeupdateupdate

Constructor Detail

SHA3Digestback to summary
public SHA3Digest()
SHA3Digestback to summary
public SHA3Digest(CryptoServicePurpose purpose)
SHA3Digestback to summary
public SHA3Digest(int bitLength)
SHA3Digestback to summary
public SHA3Digest(int bitLength, CryptoServicePurpose purpose)
SHA3Digestback to summary
public SHA3Digest(SHA3Digest source)

Method Detail

checkBitLengthback to summary
private static int checkBitLength(int bitLength)
doFinalback to summary
public int doFinal(byte[] out, int outOff)

Overrides org.bouncycastle.crypto.digests.KeccakDigest.doFinal.

Implements org.bouncycastle.crypto.Digest.doFinal.

Doc from org.bouncycastle.crypto.Digest.doFinal.

close the digest, producing the final digest value. The doFinal call leaves the digest reset.

Parameters
out:byte[]

the array the digest is to be copied into.

outOff:int

the offset into the out array the digest is to start at.

doFinalback to summary
protected int doFinal(byte[] out, int outOff, byte partialByte, int partialBits)

Overrides org.bouncycastle.crypto.digests.KeccakDigest.doFinal.

getAlgorithmNameback to summary
public String getAlgorithmName()

Overrides org.bouncycastle.crypto.digests.KeccakDigest.getAlgorithmName.

Implements org.bouncycastle.crypto.Digest.getAlgorithmName.

Doc from org.bouncycastle.crypto.Digest.getAlgorithmName.

return the algorithm name

Returns:String

the algorithm name