Show / Hide Table of Contents

Class Blake2BConfig

Configuration for the Blake2 hash.

Inheritance
System.Object
Blake2BConfig
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 sealed class Blake2BConfig

Constructors

| Improve this Doc View Source

Blake2BConfig()

Initializes a new instance of the Blake2BConfig class.

Declaration
public Blake2BConfig()

Properties

| Improve this Doc View Source

Key

Gets or sets the key value used in the hash. If not null, must be 128 bytes or shorter.

Declaration
public byte[] Key { get; set; }
Property Value
Type Description
System.Byte[]
Remarks

Blake2 keyed hashing can be used for authentication as a faster and simpler replacement for HMAC.

Exceptions
Type Condition
System.ArgumentException

Attempt to set Key greater than 128 bytes.

| Improve this Doc View Source

LockMemoryPolicy

Gets or sets the policy for created memory buffers.

Declaration
public LockMemoryPolicy LockMemoryPolicy { get; set; }
Property Value
Type Description
LockMemoryPolicy
| Improve this Doc View Source

OutputSizeInBits

Gets or sets the output size in bits. Must be a multiple of 8.

Declaration
public int OutputSizeInBits { get; set; }
Property Value
Type Description
System.Int32
Exceptions
Type Condition
System.ArgumentException

Attempt to set OutputSizeInBits to a value not a multiple of 8 bits.

| Improve this Doc View Source

OutputSizeInBytes

Gets or sets the output size in bytes. Must be less than or equal to 64.

Declaration
public int OutputSizeInBytes { get; set; }
Property Value
Type Description
System.Int32
Remarks

Blake2 incorporates this value into the hash. The array returned by the Isopoh.Cryptography.Blake2b.Blake2BHasher.Isopoh.Cryptography.Blake2b.Blake2BHasher.Finish call will be this length unless the Result64ByteBuffer value is non-null. If that property is non-null, that buffer gets returned by the Isopoh.Cryptography.Blake2b.Blake2BHasher.Isopoh.Cryptography.Blake2b.Blake2BHasher.Finish call regardless of the OutputSizeInBytes property. In that case, you can copy the first OutputSizeInBytes bytes of the Result64ByteBuffer array to get the value that Blake2 would have returned.

| Improve this Doc View Source

Personalization

Gets or sets the personalization value used in the hash. If not null, must be 16 bytes.

Declaration
public byte[] Personalization { get; set; }
Property Value
Type Description
System.Byte[]
Exceptions
Type Condition
System.ArgumentException

Attempt to set Personalization to non-null other than 16 bytes.

| Improve this Doc View Source

Result64ByteBuffer

Gets or sets the 64-byte result buffer the Blake2 algorithm will use.

Declaration
public byte[] Result64ByteBuffer { get; set; }
Property Value
Type Description
System.Byte[]
Remarks

If not null, this is the buffer that will get returned by the Isopoh.Cryptography.Blake2b.Blake2BHasher.Isopoh.Cryptography.Blake2b.Blake2BHasher.Finish call regardless of the value of OutputSizeInBytes.

Exceptions
Type Condition
System.ArgumentException

Attempt to set Result64ByteBuffer to non-null other than 64 bytes.

| Improve this Doc View Source

Salt

Gets or sets the salt value used in the hash. If not null, must be 16 bytes.

Declaration
public byte[] Salt { get; set; }
Property Value
Type Description
System.Byte[]
Exceptions
Type Condition
System.ArgumentException

Attempt to set Salt to non-null other than 16 bytes.

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