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

A Hash-based Message Authentication Code (HMAC) can be used to determine whether a message sent over an insecure 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 HMAC as a single message. The receiver recomputes the hash value on the received message and checks that the computed hash value matches the transmitted hash value.

HMAC can be used with any iterative cryptographic hash function, such as MD5 or SHA-1, in combination with a secret shared key. The cryptographic strength of HMAC depends on the properties of the underlying hash function.

Any change to the data or the hash value results in a mismatch, because knowledge of the secret key is required to change the message and reproduce the correct hash value. Therefore, if the original and computed hash values match, the message is authenticated.

Represents the abstract class from which all implementations of Hash-based Message Authentication Code (HMAC) must derive.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  A Hash-based Message Authentication Code (HMAC) uses a hash function where data is hashed by iterating a basic compression function on blocks of data. is the byte size of such a block. Its value is 64 bytes.

  Gets or sets the block size to use in the hash value.

- Method
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.HMAC

  By default, this overload uses the SHA-1 implementation of HMAC. If you want to specify a different implementation, use the overload, which lets you specify an algorithm name, instead.

  Creates an instance of the default implementation of a Hash-based Message Authentication Code (HMAC).

  A new SHA-1 instance, unless the default settings have been changed by using the <cryptoClass> element.

- Method
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.HMAC ``

  HMAC supports a number of hash algorithms, including MD5, SHA-1, SHA-256, and RIPEMD160. For the full list, see the supported values for the parameter.

  Creates an instance of the specified implementation of a Hash-based Message Authentication Code (HMAC).

  A new instance of the specified HMAC implementation.

  The HMAC implementation to use. The following table shows the valid values for the parameter and the algorithms they map to.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  This method is called by the public Dispose() method and the Finalize method. Dispose() invokes the protected Dispose(Boolean) method with the parameter set to true. Finalize invokes Dispose with set to false.

  When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose() method of each referenced object.

  Releases the unmanaged resources used by the class when a key change is legitimate and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  This method is not called by application code.

  This abstract method performs the hash computation. Every write to the cryptographic stream object passes the data through this method. For each block of data, this method updates the state of the hash object so that a correct hash value is returned at the end of the data stream.

  When overridden in a derived class, routes data written to the object into the default hash algorithm for computing the hash value.

  The input data. The offset into the byte array from which to begin using data. The number of bytes in the array to use as data.
- Method
  2.0.0.0
  4.0.0.0
  System.Byte[]

  This method is not called by application code. This method finalizes any partial computation and returns the correct hash value of the data stream.

  When overridden in a derived class, finalizes the hash computation after the last data is processed by the cryptographic stream object.

  The computed hash code in a byte array.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added. To be added.

  Gets or sets the name of the hash algorithm to use for hashing.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  A Hash-based Message Authentication Code (HMAC) can be used to determine whether a message sent over an insecure 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 HMAC as a single message. The receiver recomputes the hash value on the received message and checks that the computed hash value matches the transmitted hash value.

  HMAC can be used with any iterative cryptographic hash function, such as MD5 or SHA-1, in combination with a secret shared key. The cryptographic strength of HMAC depends on the properties of the underlying hash function.

  Any change to the data or the hash value will result in a mismatch, because knowledge of the secret key is required to change the message and reproduce the correct hash value. Therefore, if the original and computed hash values match, the message is authenticated.

  Initializes an instance of the default implementation of .

- Property
  2.0.0.0
  4.0.0.0
  System.Byte[] To be added.

  This property is the key for the keyed hash algorithm.

  A Hash-based Message Authentication Code (HMAC) can be used to determine whether a message sent over an insecure 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 HMAC as a single message. The receiver recomputes the hash value on the received message and checks that the computed hash value matches the transmitted hash value.

  HMAC can be used with any iterative cryptographic hash function, such as MD5 or SHA-1, in combination with a secret shared key. The cryptographic strength of HMAC depends on the properties of the underlying hash function.

  Any change to the data or the hash value results in a mismatch, because knowledge of the secret key is required to change the message and reproduce the correct hash value. Therefore, if the original and computed hash values match, the message is authenticated.

  Gets or sets the key to use in the hash algorithm.