mscorlib 2.0.0.0 4.0.0.0 System.Security.Cryptography.HMAC System.Runtime.InteropServices.ComVisible(true)

is a type of keyed hash algorithm that is constructed from the SHA-384 hash function and used as a Hash-based Message Authentication Code (HMAC). The HMAC process mixes a secret key with the message data and hashes the result. The hash value is mixed with the secret key again, and then hashed a second time. The output hash is 384 bits long.

An HMAC can be used to determine whether a message sent over a nonsecure channel has been tampered with, provided that the sender and receiver share a secret key. The sender computes the hash value for the original data and sends both the original data and the hash value as a single message. The receiver recalculates the hash value on the received message and checks that the computed HMAC matches the transmitted HMAC.

If the original and computed hash values match, the message is authenticated. If they do not match, either the data or the hash value has been changed. HMACs provide security against tampering because knowledge of the secret key is required to change the message and reproduce the correct hash value.

accepts all key sizes and produces a hash sequence that is 384 bits long.

Computes a Hash-based Message Authentication Code (HMAC) using the hash function.

- Constructor
  2.0.0.0
  4.0.0.0

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

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

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

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

  The secret key for 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-384) to derive a 128-byte key. If it is less than 128 bytes long, it is padded to 128 bytes.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The purpose of the Boolean property is to enable net_v20SP1_long applications to interact with dnprdnlong applications. When you set this property to true, the object produces values that match the values produced by the dnprdnlong. You should set this property only once after you create your HMAC object. You will need to reset your key afterwards, as shown in the following example.

  `public static void Test() { HMACSHA384 hmac = new HMACSHA384(); hmac.ProduceLegacyHmacValues = true; hmac.Key = // ...Get the HMAC key. // ... // Use the HMAC algorithm. // ... }`

  Provides a workaround for the dnprdnext implementation of the algorithm, which is inconsistent with the net_v20SP1_long implementation of the algorithm.