/// <summary> /// Initializes a new instance of the AxCryptHMACSHA1 class /// with a provided key. /// </summary> /// <param name="key">The key</param> public static HMAC Create(AesKey key) { if (key == null) { throw new ArgumentNullException("key"); } AxCryptHMACSHA1 hmac = new AxCryptHMACSHA1(); hmac.BlockSizeValue = 20; hmac.Key = key.GetBytes(); return hmac; }
/// <summary> /// Initializes a new instance of the AxCryptHMACSHA1 class /// with a provided key. /// </summary> /// <param name="key">The key</param> public static HMAC Create(AesKey key) { if (key == null) { throw new ArgumentNullException("key"); } AxCryptHMACSHA1 hmac = new AxCryptHMACSHA1(); hmac.BlockSizeValue = 20; hmac.Key = key.GetBytes(); return(hmac); }