示例#1
0
        /// <summary>
        /// Clears the hash in memory
        /// </summary>
        public void ClearHash()
        {
            if (_hash != null)
            {
                ByteHelper.ClearBytes(_hash);
            }

            _hash = null;
        }
示例#2
0
 /// <summary>
 /// Performs the hashing operation. The data is applied to the hash algorithm as they come in dataProviders.
 /// </summary>
 /// <param name="dataProviders"></param>
 public void Hash(byte[] buffer, int index, params HashDataProvider[] dataProviders)
 {
     Array.Copy(Hash(dataProviders), 0, buffer, index, HashBitSize / 8);
     ByteHelper.ClearBytes(_hashAlgorithm.Hash);
     _hashAlgorithm.Clear();
 }
示例#3
0
 public void InjectHash(byte[] hash)
 {
     _injectedHash = new byte[hash.Length];
     Array.Copy(hash, _injectedHash, hash.Length);
     ByteHelper.ClearBytes(hash);
 }