System.Security.Cryptography.HMACSHA512.Initialize C# (CSharp) Method

Initialize() public method

public Initialize ( ) : void
return void
        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;
        }

Usage Example

 public byte[] Hash(byte[] clearBytes)
 {
     using (var hmac = new HMACSHA512(_key))
     {
         hmac.Initialize();
         byte[] hashBytes = hmac.ComputeHash(clearBytes);
         return hashBytes;
     }
 }
All Usage Examples Of System.Security.Cryptography.HMACSHA512::Initialize