public override void Initialize()
{
// Nothing to do here. We expect HashAlgorithm to invoke HashFinal() and Initialize() as a pair. This reflects the
// reality that our native crypto providers (e.g. CNG) expose hash finalization and object reinitialization as an atomic operation.
return;
}
public byte[] Hash(byte[] clearBytes) { using (var hmac = new HMACSHA512(_key)) { hmac.Initialize(); byte[] hashBytes = hmac.ComputeHash(clearBytes); return hashBytes; } }