Show / Hide Table of Contents

Class Blake2B

Convenience calls for performing Blake2 hashes.

Inheritance
System.Object
Blake2B
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Isopoh.Cryptography.Blake2b
Assembly: Isopoh.Cryptography.Blake2b.dll
Syntax
public static class Blake2B

Fields

| Improve this Doc View Source

OutputLength

The output length of the Blake2 hash in bytes.

Declaration
public const int OutputLength = 64
Field Value
Type Description
System.Int32
Remarks

This is the maximum length buffer a Blake2 hash can produce Blake2 will always hash to this length even when configured to hash to a shorter value - the final step is to truncate the result.

Note, the length of the expected result is hashed into the result so the OutputLength-byte buffer will hold different values depending on the configured output length. Do not run Blake2 using the default length and then truncate and expect to get the same result as if you configured Blake2 to produce a shorter result.

Methods

| Improve this Doc View Source

ComputeHash(Byte[], Blake2BConfig, SecureArrayCall)

Perform a Blake2 hash on the given buffer using the given Blake2 configuration.

Declaration
public static byte[] ComputeHash(byte[] data, Blake2BConfig config, SecureArrayCall secureArrayCall)
Parameters
Type Name Description
System.Byte[] data

The buffer to hash.

Blake2BConfig config

The configuration to use.

SecureArrayCall secureArrayCall

The methods that get called to secure arrays. A null value defaults to SecureArray.DefaultCall.

Returns
Type Description
System.Byte[]

The hash of the buffer.

| Improve this Doc View Source

ComputeHash(Byte[], SecureArrayCall)

Perform a default Blake2 hash on the given buffer.

Declaration
public static byte[] ComputeHash(byte[] data, SecureArrayCall secureArrayCall)
Parameters
Type Name Description
System.Byte[] data

The buffer to hash.

SecureArrayCall secureArrayCall

The methods that get called to secure arrays. A null value defaults to SecureArray.DefaultCall.

Returns
Type Description
System.Byte[]

The hash of the buffer.

| Improve this Doc View Source

ComputeHash(Byte[], Int32, Int32, Blake2BConfig, SecureArrayCall)

Perform a Blake2 hash on the given buffer using the given Blake2 configuration.

Declaration
public static byte[] ComputeHash(byte[] data, int start, int count, Blake2BConfig config, SecureArrayCall secureArrayCall)
Parameters
Type Name Description
System.Byte[] data

The buffer to hash.

System.Int32 start

The byte in the buffer to start hashing.

System.Int32 count

The number of bytes to hash.

Blake2BConfig config

The configuration to use.

SecureArrayCall secureArrayCall

The methods that get called to secure arrays. A null value defaults to SecureArray.DefaultCall.

Returns
Type Description
System.Byte[]

The hash of the buffer.

| Improve this Doc View Source

ComputeHash(Byte[], Int32, Int32, SecureArrayCall)

Perform a default Blake2 hash on the given buffer.

Declaration
public static byte[] ComputeHash(byte[] data, int start, int count, SecureArrayCall secureArrayCall)
Parameters
Type Name Description
System.Byte[] data

The buffer to hash.

System.Int32 start

The byte in the buffer to start hashing.

System.Int32 count

The number of bytes to hash.

SecureArrayCall secureArrayCall

The methods that get called to secure arrays. A null value defaults to SecureArray.DefaultCall.

Returns
Type Description
System.Byte[]

The hash of the buffer.

| Improve this Doc View Source

Create(Blake2BConfig, SecureArrayCall)

Create a Blake2 hash with the given configuration.

Declaration
public static Hasher Create(Blake2BConfig config, SecureArrayCall secureArrayCall)
Parameters
Type Name Description
Blake2BConfig config

The configuration to use.

SecureArrayCall secureArrayCall

The methods that get called to secure arrays. A null value defaults to SecureArray.DefaultCall.

Returns
Type Description
Hasher

A Hasher that can be converted to a System.Security.Cryptography.HashAlgorithm.

| Improve this Doc View Source

Create(SecureArrayCall)

Create a default Blake2 hash.

Declaration
public static Hasher Create(SecureArrayCall secureArrayCall)
Parameters
Type Name Description
SecureArrayCall secureArrayCall

The methods that get called to secure arrays. A null value defaults to SecureArray.DefaultCall.

Returns
Type Description
Hasher

A Hasher that can be converted to a System.Security.Cryptography.HashAlgorithm.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX