Class Sha3Digest
- Namespace
- Org.BouncyCastle.Crypto.Digests
- Assembly
- BouncyCastle.Cryptography.dll
Implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
public class Sha3Digest : KeccakDigest, IDigest, IMemoable
- Inheritance
-
Sha3Digest
- Implements
- Inherited Members
Remarks
Following the naming conventions used in the C source code to enable easy review of the implementation.
Constructors
Sha3Digest()
public Sha3Digest()
Sha3Digest(Sha3Digest)
public Sha3Digest(Sha3Digest source)
Parameters
sourceSha3Digest
Sha3Digest(int)
public Sha3Digest(int bitLength)
Parameters
bitLengthint
Properties
AlgorithmName
The algorithm name.
public override string AlgorithmName { get; }
Property Value
Methods
Copy()
Produce a copy of this object with its configuration and in its current state.
public override IMemoable Copy()
Returns
Remarks
The returned object may be used simply to store the state, or may be used as a similar object starting from the copied state.
DoFinal(byte[], int)
Close the digest, producing the final digest value.
public override int DoFinal(byte[] output, int outOff)
Parameters
outputbyte[]The byte array the digest is to be copied into.
outOffintThe offset into the byte array the digest is to start at.
Returns
- int
The number of bytes written.
Remarks
This call leaves the digest reset.
DoFinal(byte[], int, byte, int)
protected override int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)
Parameters
Returns
DoFinal(Span<byte>)
Close the digest, producing the final digest value.
public override int DoFinal(Span<byte> output)
Parameters
Returns
- int
The number of bytes written.
Remarks
This call leaves the digest reset.