Method CreateHmac
- Namespace
- DocWright.Cryptography
- Assembly
- DocWright.Cryptography.dll
CreateHmac(OfficeHashAlgorithmKind, byte[])
Creates a keyed HMAC instance.
public static HMAC CreateHmac(OfficeHashAlgorithmKind kind, byte[] key)
Parameters
kindOfficeHashAlgorithmKindThe underlying hash algorithm.
keybyte[]The HMAC key.
Returns
- HMAC
A new instance the caller must dispose.
Exceptions
- ArgumentNullException
keyis null.- UnsupportedFeatureException
The algorithm is not implemented, or the platform refuses it.