Bouncy Castle Cryptography Library 1.81

org.bouncycastle.crypto.digests
Class CSHAKEDigest

java.lang.Object
  extended byorg.bouncycastle.crypto.digests.KeccakDigest
      extended byorg.bouncycastle.crypto.digests.SHAKEDigest
          extended byorg.bouncycastle.crypto.digests.CSHAKEDigest
All Implemented Interfaces:
Digest, ExtendedDigest, Xof

public class CSHAKEDigest
extends SHAKEDigest

Customizable SHAKE function.


Field Summary
 
Fields inherited from class org.bouncycastle.crypto.digests.KeccakDigest
bitsInQueue, dataQueue, fixedOutputLength, purpose, rate, squeezing, state
 
Constructor Summary
CSHAKEDigest(CSHAKEDigest source)
           
CSHAKEDigest(int bitLength, byte[] N, byte[] S)
          Base constructor.
CSHAKEDigest(int bitLength, CryptoServicePurpose purpose, byte[] N, byte[] S)
          Base constructor.
 
Method Summary
 int doOutput(byte[] out, int outOff, int outLen)
          Start outputting the results of the final calculation for this digest.
 java.lang.String getAlgorithmName()
          return the algorithm name
 void reset()
          reset the digest back to it's initial state.
 
Methods inherited from class org.bouncycastle.crypto.digests.SHAKEDigest
cryptoServiceProperties, doFinal, doFinal, doFinal, doFinal, getDigestSize
 
Methods inherited from class org.bouncycastle.crypto.digests.KeccakDigest
absorb, absorb, absorbBits, getByteLength, squeeze, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.bouncycastle.crypto.ExtendedDigest
getByteLength
 
Methods inherited from interface org.bouncycastle.crypto.Digest
update, update
 

Constructor Detail

CSHAKEDigest

public CSHAKEDigest(int bitLength,
                    byte[] N,
                    byte[] S)
Base constructor.

Parameters:
bitLength - security strength (in bits) of the underlying SHAKE function, 128 or 256.
N - the function name string, note this is reserved for use by NIST. Avoid using it if not required.
S - the customization string - available for local use.

CSHAKEDigest

public CSHAKEDigest(int bitLength,
                    CryptoServicePurpose purpose,
                    byte[] N,
                    byte[] S)
Base constructor.

Parameters:
bitLength - security strength (in bits) of the underlying SHAKE function, 128 or 256.
purpose - the purpose for constructing the CSHAKEDigest
N - the function name string, note this is reserved for use by NIST. Avoid using it if not required.
S - the customization string - available for local use.

CSHAKEDigest

public CSHAKEDigest(CSHAKEDigest source)
Method Detail

getAlgorithmName

public java.lang.String getAlgorithmName()
Description copied from interface: Digest
return the algorithm name

Specified by:
getAlgorithmName in interface Digest
Overrides:
getAlgorithmName in class SHAKEDigest

doOutput

public int doOutput(byte[] out,
                    int outOff,
                    int outLen)
Description copied from interface: Xof
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.

Specified by:
doOutput in interface Xof
Overrides:
doOutput in class SHAKEDigest

reset

public void reset()
Description copied from interface: Digest
reset the digest back to it's initial state.

Specified by:
reset in interface Digest
Overrides:
reset in class KeccakDigest

Bouncy Castle Cryptography Library 1.81