Table of Contents

Class CShakeDigest

Namespace
Org.BouncyCastle.Crypto.Digests
Assembly
BouncyCastle.Cryptography.dll

Customizable SHAKE function.

public class CShakeDigest : ShakeDigest, IMemoable, IXof, IDigest
Inheritance
CShakeDigest
Implements
Inherited Members

Constructors

CShakeDigest(CShakeDigest)

public CShakeDigest(CShakeDigest source)

Parameters

source CShakeDigest

CShakeDigest(int, byte[], byte[])

Base constructor

public CShakeDigest(int bitLength, byte[] N, byte[] S)

Parameters

bitLength int

bit length of the underlying SHAKE function, 128 or 256.

N byte[]

the function name string, note this is reserved for use by NIST. Avoid using it if not required.

S byte[]

the customization string - available for local use.

Properties

AlgorithmName

The algorithm name.

public override string AlgorithmName { get; }

Property Value

string

Methods

Output(byte[], int, int)

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

public override int Output(byte[] output, int outOff, int outLen)

Parameters

output 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

Output(Span<byte>)

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

public override int Output(Span<byte> output)

Parameters

output Span<byte>

span to fill with the output bytes.

Returns

int

the number of bytes written

Reset()

Reset the digest back to its initial state.

public override void Reset()