HMACSHA384 Constructors

Definition

Initializes a new instance of the HMACSHA384 class.

Overloads

HMACSHA384()

Initializes a new instance of the HMACSHA384 class by using a randomly generated key.

HMACSHA384(Byte[])

Initializes a new instance of the HMACSHA384 class by using the specified key data.

HMACSHA384()

Source:
HMACSHA384.cs
Source:
HMACSHA384.cs
Source:
HMACSHA384.cs

Initializes a new instance of the HMACSHA384 class by using a randomly generated key.

public HMACSHA384 ();

Remarks

This constructor uses a 64-byte, randomly generated key.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1

HMACSHA384(Byte[])

Source:
HMACSHA384.cs
Source:
HMACSHA384.cs
Source:
HMACSHA384.cs

Initializes a new instance of the HMACSHA384 class by using the specified key data.

public HMACSHA384 (byte[] key);

Parameters

key
Byte[]

The secret key for HMAC computation. The key can be any length. However, the recommended size is 128 bytes. If the key is more than 128 bytes long, it is hashed (using SHA-384) to derive a 48-byte key.

Exceptions

The key parameter is null.

Examples

For an example of how to use this constructor, see the HMACSHA384 class.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1