<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.0" />

Blake2xsDigest

public sealed class Blake2xsDigest : IXof, IDigest
Implementation of the eXtendable Output Function (XOF) BLAKE2xs. BLAKE2xs is optimized for 32-bit platforms and produces digests of any size between 1 and 2^16-2 bytes. The length can also be unknown and then the maximum length will be 2^32 blocks of 32 bytes.
public const int UnknownDigestLength = 65535

public string AlgorithmName { get; }

public Blake2xsDigest()

Initializes a new instance of Blake2xsDigest for hashing an unknown digest length.

public Blake2xsDigest(int digestBytes)

Initializes a new instance of Blake2xsDigest with a given digest size.

public Blake2xsDigest(int digestBytes, byte[] key)

Initializes a new instance of Blake2bDigest with a key and given digest length.

After calling the DoFinal method, the key will remain to be used for further computations of this instance.

public Blake2xsDigest(int digestBytes, byte[] key, byte[] salt, byte[] personalization)

Initializes a new instance of Blake2xsDigest with a key, required digest length (in bytes), salt and personalization.

Constructs a new instance of Blake2xsDigest from another Blake2xsDigest./>.

public void BlockUpdate(byte[] input, int inOff, int inLen)

public int DoFinal(byte[] output, int outOff)

Close the digest, producing the final digest value.

public int GetByteLength()

Return the size in bytes of the internal buffer the digest applies it's compression function to.

public int GetDigestSize()

public long GetUnknownMaxLength()

Return the maximum size in bytes the digest can produce when the length is unknown

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

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.

public int OutputFinal(byte[] output, int outOff, int outLen)

Close the digest, producing the final digest value.

public void Reset()

Reset the digest back to it's initial state. The key, the salt and the personalization will remain for further computations.

public void Update(byte b)