/// <summary> /// Initializes a new instance of the <see cref="HmacSha512"/> using the given key. /// </summary> /// <exception cref="ArgumentNullException"/> /// <param name="key">Key to use, if the key is bigger than 64 bytes it will be hashed using <see cref="Sha512"/></param> public HmacSha512(byte[] key) { hashFunc = new Sha512(); Key = key; }
/// <summary> /// Initializes a new instance of the <see cref="HmacSha512"/>. /// <para/> Useful for using the same instance for computing HMAC each time with a different key /// by calling <see cref="ComputeHash(byte[], byte[])"/> /// </summary> public HmacSha512() { hashFunc = new Sha512(); }