Class AsconXof
- Namespace
- Org.BouncyCastle.Crypto.Digests
- Assembly
- BouncyCastle.Cryptography.dll
ASCON v1.2 XOF, https://ascon.iaik.tugraz.at/ .
[Obsolete("This class is deprecated. For the latest Ascon version, use AsconXof128 or AsconCXof128 instead.")]
public sealed class AsconXof : IXof, IDigest
- Inheritance
-
AsconXof
- Implements
- Inherited Members
Remarks
https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/ascon-spec-final.pdf
ASCON v1.2 XOF with reference to C Reference Impl from: https://github.com/ascon/ascon-c .
Constructors
AsconXof(AsconParameters)
public AsconXof(AsconXof.AsconParameters parameters)
Parameters
parametersAsconXof.AsconParameters
Properties
AlgorithmName
The algorithm name.
public string AlgorithmName { get; }
Property Value
Methods
BlockUpdate(byte[], int, int)
Update the message digest with a block of bytes.
public void BlockUpdate(byte[] input, int inOff, int inLen)
Parameters
inputbyte[]The byte array containing the data.
inOffintThe offset into the byte array where the data starts.
inLenintThe length of the data.
BlockUpdate(ReadOnlySpan<byte>)
Update the message digest with a span of bytes.
public void BlockUpdate(ReadOnlySpan<byte> input)
Parameters
inputReadOnlySpan<byte>The span containing the data.
DoFinal(byte[], int)
Close the digest, producing the final digest value.
public 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(Span<byte>)
Close the digest, producing the final digest value.
public int DoFinal(Span<byte> output)
Parameters
Returns
- int
The number of bytes written.
Remarks
This call leaves the digest reset.
GetByteLength()
Return the size, in bytes, of the internal buffer used by this digest.
public int GetByteLength()
Returns
- int
The size, in bytes, of the internal buffer used by this digest.
GetDigestSize()
Return the size, in bytes, of the digest produced by this message digest.
public int GetDigestSize()
Returns
- int
The size, in bytes, of the digest produced by this message digest.
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 int Output(byte[] output, int outOff, int outLen)
Parameters
outputbyte[]output array to write the output bytes to.
outOffintoffset to start writing the bytes at.
outLenintthe 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 int Output(Span<byte> output)
Parameters
Returns
- int
the number of bytes written
OutputFinal(byte[], int, int)
Output the results of the final calculation for this XOF to outLen number of bytes.
public int OutputFinal(byte[] output, int outOff, int outLen)
Parameters
outputbyte[]output array to write the output bytes to.
outOffintoffset to start writing the bytes at.
outLenintthe number of output bytes requested.
Returns
- int
the number of bytes written
OutputFinal(Span<byte>)
Output the results of the final calculation for this XOF to fill the output span.
public int OutputFinal(Span<byte> output)
Parameters
Returns
- int
the number of bytes written
Reset()
Reset the digest back to its initial state.
public void Reset()
Update(byte)
Update the message digest with a single byte.
public void Update(byte input)
Parameters
inputbyteThe input byte to be entered.