Пример #1
0
 internal RecordStream(
     TlsProtocolHandler handler,
     Stream inStr,
     Stream outStr)
 {
     this.handler          = handler;
     this.inStr            = inStr;
     this.outStr           = outStr;
     this.hash             = new CombinedHash();
     this.readCompression  = new TlsNullCompression();
     this.writeCompression = this.readCompression;
     this.readCipher       = new TlsNullCipher();
     this.writeCipher      = this.readCipher;
 }
Пример #2
0
 internal CombinedHash(CombinedHash t)
 {
     this.md5  = new MD5Digest(t.md5);
     this.sha1 = new Sha1Digest(t.sha1);
 }
Пример #3
0
 private static byte[] DoFinal(CombinedHash ch)
 {
     byte[] bs = new byte[ch.GetDigestSize()];
     ch.DoFinal(bs, 0);
     return(bs);
 }