Επεξεργασία

Κοινή χρήση μέσω


HMACSHA512 Constructors

Definition

Initializes a new instance of the HMACSHA512 class.

Overloads

HMACSHA512()

Initializes a new instance of the HMACSHA512 class with a randomly generated key.

HMACSHA512(Byte[])

Initializes a new instance of the HMACSHA512 class with the specified key data.

HMACSHA512()

Source:
HMACSHA512.cs
Source:
HMACSHA512.cs
Source:
HMACSHA512.cs

Initializes a new instance of the HMACSHA512 class with a randomly generated key.

public:
 HMACSHA512();
public HMACSHA512 ();
Public Sub New ()

Remarks

With this constructor, a 64-byte, randomly generated key is used.

See also

Applies to

HMACSHA512(Byte[])

Source:
HMACSHA512.cs
Source:
HMACSHA512.cs
Source:
HMACSHA512.cs

Initializes a new instance of the HMACSHA512 class with the specified key data.

public:
 HMACSHA512(cli::array <System::Byte> ^ key);
public HMACSHA512 (byte[] key);
new System.Security.Cryptography.HMACSHA512 : byte[] -> System.Security.Cryptography.HMACSHA512
Public Sub New (key As Byte())

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-512) to derive a 64-byte key.

Exceptions

The key parameter is null.

Examples

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

See also

Applies to