Blake2b512 Class
Namespace: Rebex.Security.Cryptography
Assembly: Rebex.Security.dll (version 7.0.9083)
This class represents the BLAKE2b cryptographic hash and message authentication code (MAC) algorithm with hash size of 512 bits (64 bytes).
Syntax
public sealed class Blake2b512 : Blake2b, ICryptoTransform, IDisposable
Inherited Members
Remarks
The 512-bit (64-byte) BLAKE2b hash value can be computed using an instance of this class that offers methods declared by .NET KeyedHashAlgorithm base class. In scenarios where instantiating this class presents an unnecessary overhead, a hash value can also be created using static (shared in VB) Blake2b512.HashData methods.
Examples
// sourceData argument contains data to be hashed.
public byte[] Calculate512BitsHash(byte[] sourceData)
{
// create an instance of Blake2b512 class
using (var blake2b512 = new Blake2b512())
{
// compute and return the 512-bit (64-byte) hash
return blake2b512.ComputeHash(sourceData);
} // blake2b512 instance is disposed
}
Constructors
Name | Description |
---|---|
Blake2b512() | Initializes a new instance of the Blake2b512 class. |
Blake2b512(Byte[]) | Initializes a new instance of the Blake2b class. |
Properties
Name | Description |
---|---|
CanReuseTransform | Gets a value indicating whether the current transform can be reused. Inherited from Blake2b. |
CanTransformMultipleBlocks | Gets the value indicating whether the instance can transform multiple blocks. Inherited from Blake2b. |
HashSize | Gets the size of the hash in bits. Inherited from Blake2b. |
Key | Key to use in HMAC calculations. The key must be a 0 - 64 bytes long array or null. When a null value is provided, the key is treated as an empty array. When the key is null or an empty array, the instance will calculate hashes. When the key is 1 - 64 bytes long, the instance will calculate message authentication codes (HMAC). An instance of the Blake2b class creates, uses, and clears a copy of key. An instance of the Blake2b class is not the owner of the key. Every call of the get accessor returns a new deep copy of the key. and the key will not be cleared when the Dispose(Boolean) method is called. Inherited from Blake2b. |
Methods
Name | Description |
---|---|
Dispose(Boolean) | Releases the resources used by this instance of the Blake2b class. Inherited from Blake2b. |
HashCore(Byte[], Int32, Int32) | Hashes the specified segment of the specified |
HashCore(ReadOnlySpan<Byte>) | Hashes the specified |
HashData(ArraySegment<Byte>, ArraySegment<Byte>) | Computes a 512-bit (64-byte) hash using the BLAKE2b cryptographic hash and message authentication code (MAC) algorithm. |
HashData(ArraySegment<Byte>, ArraySegment<Byte>, ArraySegment<Byte>) | Computes a 512-bit (64-byte) hash using the BLAKE2b cryptographic hash and message authentication code (MAC) algorithm. |
HashData(Byte[], Byte[]) | Computes a 512-bit (64-byte) hash using the BLAKE2b cryptographic hash and message authentication code (MAC) algorithm. |
HashFinal() | Finishes hash computation. Inherited from Blake2b. |
Initialize() | Resets the instance to its initial state. Discards all data from the previous or current hash computation. Inherited from Blake2b. |
TryHashFinal(Span<Byte>, out Int32) | Finishes hash computation. Inherited from Blake2b. |