protected void CheckTrackingHash(Int16 hashAlgorithm)
 {
     if (!hashes.ContainsKey(hashAlgorithm))
     {
         IDigest hash = DtlsHelper.CreateHash(hashAlgorithm);
         hashes[hashAlgorithm] = hash;
     }
 }
        public IDigest ForkPrfHash()
        {
            CheckStopBuffering();

            if (buf != null)
            {
                IDigest prfHash = DtlsHelper.CreateHash((short)prfHashAlgorithm);
                buf.UpdateDigest(prfHash);
                return(prfHash);
            }

            return(DtlsHelper.CloneHash((short)prfHashAlgorithm, (IDigest)hashes[prfHashAlgorithm.Value]));
        }
 public CombinedHash()
 {
     this.md5  = DtlsHelper.CreateHash(HashAlgorithm.md5);
     this.sha1 = DtlsHelper.CreateHash(HashAlgorithm.sha1);
 }