Example #1
0
        private HashStream TakeHashStream()
        {
            HashStream hashStream = null;

            if (_hashStream == null)
            {
                _hashStream = hashStream = new HashStream(CryptoHelper.CreateHashAlgorithm(AlgorithmSuite.DefaultDigestAlgorithm));
            }
            else
            {
                hashStream = _hashStream;
                ;
                hashStream.Reset();
            }
            return(hashStream);
        }
Example #2
0
 internal static HashAlgorithm NewSha256HashAlgorithm()
 {
     return(CryptoHelper.CreateHashAlgorithm(SecurityAlgorithms.Sha256Digest));
 }