CreateHmacCryptoSha1 Method
Definition
- Namespace
- Cuemon.Security.Cryptography
- Assemblies
- Cuemon.Security.Cryptography.dll
CreateHmacCryptoSha1(byte[], Action<ConvertibleOptions>)
Creates an instance of HmacSecureHashAlgorithm1.
public static Hash CreateHmacCryptoSha1(byte[] secret, Action<ConvertibleOptions> setup = null)
Parameters
secretbyte[]The secret key for HmacSecureHashAlgorithm1 encryption. The key can be any length, but if it is more than 64 bytes long it will be hashed (using SHA-1) to derive a 64-byte key. Therefore, the recommended size of the secret key is 64 bytes.
setupAction<ConvertibleOptions>The ConvertibleOptions which may be configured.
Returns
- Hash
A Hash implementation of HmacSecureHashAlgorithm1.
Exceptions
- ArgumentNullException
secretcannot be null.