Bouncy Castle Cryptography Library 1.77.0

org.bouncycastle.crypto.digests
Class SHA3Digest

java.lang.Object
  |
  +--org.bouncycastle.crypto.digests.KeccakDigest
        |
        +--org.bouncycastle.crypto.digests.SHA3Digest
All Implemented Interfaces:
Digest, ExtendedDigest

public class SHA3Digest
extends KeccakDigest

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.


Fields inherited from class org.bouncycastle.crypto.digests.KeccakDigest
bitsInQueue, dataQueue, fixedOutputLength, purpose, rate, squeezing, state
 
Constructor Summary
SHA3Digest()
           
SHA3Digest(CryptoServicePurpose purpose)
           
SHA3Digest(int bitLength)
           
SHA3Digest(int bitLength, CryptoServicePurpose purpose)
           
SHA3Digest(SHA3Digest source)
           
 
Method Summary
 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
 
Methods inherited from class org.bouncycastle.crypto.digests.KeccakDigest
absorb, absorb, absorbBits, cryptoServiceProperties, getByteLength, getDigestSize, reset, squeeze, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHA3Digest

public SHA3Digest()

SHA3Digest

public SHA3Digest(CryptoServicePurpose purpose)

SHA3Digest

public SHA3Digest(int bitLength)

SHA3Digest

public SHA3Digest(int bitLength,
                  CryptoServicePurpose purpose)

SHA3Digest

public SHA3Digest(SHA3Digest source)
Method Detail

getAlgorithmName

public java.lang.String getAlgorithmName()
Description copied from interface: Digest
return the algorithm name
Overrides:
getAlgorithmName in class KeccakDigest
Following copied from interface: org.bouncycastle.crypto.Digest
Returns:
the algorithm name

doFinal

public int doFinal(byte[] out,
                   int outOff)
Description copied from interface: Digest
close the digest, producing the final digest value. The doFinal call leaves the digest reset.
Overrides:
doFinal in class KeccakDigest
Following copied from interface: org.bouncycastle.crypto.Digest
Parameters:
out - the array the digest is to be copied into.
outOff - the offset into the out array the digest is to start at.

doFinal

protected int doFinal(byte[] out,
                      int outOff,
                      byte partialByte,
                      int partialBits)
Overrides:
doFinal in class KeccakDigest

Bouncy Castle Cryptography Library 1.77.0