CreateHmacCrypto Method
Definition
- Namespace
- Cuemon.Security.Cryptography
- Assemblies
- Cuemon.Security.Cryptography.dll
CreateHmacCrypto(byte[], KeyedCryptoAlgorithm, Action<ConvertibleOptions>)
Creates an instance of a HMAC cryptographic implementation that derives from KeyedCryptoHash<TAlgorithm> with the specified algorithm. Default is HmacSecureHashAlgorithm256.
public static Hash CreateHmacCrypto(byte[] secret, KeyedCryptoAlgorithm algorithm = KeyedCryptoAlgorithm.HmacSha256, Action<ConvertibleOptions> setup = null)
Parameters
secretbyte[]The secret key for the encryption.
algorithmKeyedCryptoAlgorithmThe KeyedCryptoAlgorithm that defines the HMAC cryptographic implementation. Default is HmacSha256.
setupAction<ConvertibleOptions>The ConvertibleOptions which may be configured.
Returns
Exceptions
- ArgumentNullException
secretcannot be null.