System.Security.Cryptography.IncrementalHash.AppendData C# (CSharp) Method

AppendData() public method

Append the entire contents of data to the data already processed in the hash or HMAC.
is null. The object has already been disposed.
public AppendData ( byte data ) : void
data byte The data to process.
return void
        public void AppendData(byte[] data)
        {
            if (data == null)
                throw new ArgumentNullException(nameof(data));

            AppendData(data, 0, data.Length);
        }

Same methods

IncrementalHash::AppendData ( byte data, int offset, int count ) : void

Usage Example

        private static void Extract(HashAlgorithmName hashAlgorithmName, int hashLength, ReadOnlySpan <byte> ikm, ReadOnlySpan <byte> salt, Span <byte> prk)
        {
            Debug.Assert(HashLength(hashAlgorithmName) == hashLength);

            using (IncrementalHash hmac = IncrementalHash.CreateHMAC(hashAlgorithmName, salt))
            {
                hmac.AppendData(ikm);
                GetHashAndReset(hmac, prk);
            }
        }
All Usage Examples Of System.Security.Cryptography.IncrementalHash::AppendData