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

pack-priv Class SHAKEDigest

extends KeccakDigest
implements Xof
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.internal.Xof, org.bouncycastle.crypto.internal.ExtendedDigest, org.bouncycastle.crypto.internal.Digest
Known Direct Subclasses
org.bouncycastle.crypto.fips.CSHAKEDigest
Imports
org.bouncycastle.crypto.internal.Xof

implementation of SHAKE based on following KeccakNISTInterface.c from http://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.fips.KeccakDigest:
bitsAvailableForSqueezingbitsInQueueCchiCchunkdataQueuefixedOutputLengthoneByteratesqueezingstatetempA

Constructor Summary

AccessConstructor and Description
public
SHAKEDigest(int bitLength)

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.fips.KeccakDigest.doFinal.

Implements org.bouncycastle.crypto.internal.Digest.doFinal.

close the digest, producing the final digest value.
public int
doFinal(byte[]
output array to write the output bytes to.
out
,
int
offset to start writing the bytes at.
outOff
,
int
the number of output bytes requested.
outLen
)

Implements org.bouncycastle.crypto.internal.Xof.doFinal.

Output the results of the final calculation for this digest to outLen number of bytes.
protected int
doFinal(byte[] out, int outOff, byte partialByte, int partialBits)

Overrides org.bouncycastle.crypto.fips.KeccakDigest.doFinal.

protected int
doFinal(byte[] out, int outOff, int outLen, byte partialByte, int partialBits)

public int
doOutput(byte[]
output array to write the output bytes to.
out
,
int
offset to start writing the bytes at.
outOff
,
int
the number of output bytes requested.
outLen
)

Implements org.bouncycastle.crypto.internal.Xof.doOutput.

Start outputting the results of the final calculation for this digest.
public String
Inherited from org.bouncycastle.crypto.fips.KeccakDigest:
absorbgetByteLengthgetDigestSizeresetsqueezeupdateupdate

Constructor Detail

SHAKEDigestback to summary
public SHAKEDigest(int bitLength)

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.fips.KeccakDigest.doFinal.

Implements org.bouncycastle.crypto.internal.Digest.doFinal.

Doc from org.bouncycastle.crypto.internal.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
public int doFinal(byte[] out, int outOff, int outLen)

Implements org.bouncycastle.crypto.internal.Xof.doFinal.

Doc from org.bouncycastle.crypto.internal.Xof.doFinal.

Output the results of the final calculation for this digest to outLen number of bytes.

Parameters
out:byte[]

output array to write the output bytes to.

outOff:int

offset to start writing the bytes at.

outLen:int

the number of output bytes requested.

Returns:int

the number of bytes written

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

Overrides org.bouncycastle.crypto.fips.KeccakDigest.doFinal.

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

Implements org.bouncycastle.crypto.internal.Xof.doOutput.

Doc from org.bouncycastle.crypto.internal.Xof.doOutput.

Start outputting the results of the final calculation for this digest. Unlike doFinal, this method will continue producing output until the Xof is explicitly reset, or signals otherwise.

Parameters
out:byte[]

output array to write the output bytes to.

outOff:int

offset to start writing the bytes at.

outLen:int

the number of output bytes requested.

Returns:int

the number of bytes written

getAlgorithmNameback to summary
public String getAlgorithmName()

Overrides org.bouncycastle.crypto.fips.KeccakDigest.getAlgorithmName.

Implements org.bouncycastle.crypto.internal.Digest.getAlgorithmName.

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

return the algorithm name

Returns:String

the algorithm name