HMACSHA512 HMACSHA512 HMACSHA512 HMACSHA512 Constructors

Definition

Overloads

HMACSHA512() HMACSHA512() HMACSHA512()

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

HMACSHA512(Byte[]) HMACSHA512(Byte[]) HMACSHA512(Byte[]) HMACSHA512(Byte[])

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

HMACSHA512() HMACSHA512() HMACSHA512()

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

HMACSHA512(Byte[]) HMACSHA512(Byte[]) HMACSHA512(Byte[]) HMACSHA512(Byte[])

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 HMACSHA512 encryption. 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 128-byte key. If it is less than 128 bytes long, it is padded to 128 bytes.

Exceptions

Examples

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

See also

Applies to