Ejemplo n.º 1
0
 public hkdf(hash.Hash expander = default, long size = default, slice <byte> info = default, byte counter = default, slice <byte> prev = default, slice <byte> buf = default)
 {
     this.expander = expander;
     this.size     = size;
     this.info     = info;
     this.counter  = counter;
     this.prev     = prev;
     this.buf      = buf;
 }
Ejemplo n.º 2
0
 public finishedHash(hash.Hash client = default, hash.Hash server = default, hash.Hash clientMD5 = default, hash.Hash serverMD5 = default, slice <byte> buffer = default, ushort version = default, Action <slice <byte>, slice <byte>, slice <byte>, slice <byte> > prf = default)
 {
     this.client    = client;
     this.server    = server;
     this.clientMD5 = clientMD5;
     this.serverMD5 = serverMD5;
     this.buffer    = buffer;
     this.version   = version;
     this.prf       = prf;
 }
Ejemplo n.º 3
0
 public tls10MAC(hash.Hash h = default, slice <byte> buf = default)
 {
     this.h   = h;
     this.buf = buf;
 }
Ejemplo n.º 4
0
 public hmac(slice <byte> opad = default, slice <byte> ipad = default, hash.Hash outer = default, hash.Hash inner = default, bool marshaled = default)
 {
     this.opad      = opad;
     this.ipad      = ipad;
     this.outer     = outer;
     this.inner     = inner;
     this.marshaled = marshaled;
 }
Ejemplo n.º 5
0
 public Hash(hash.Hash h = default, @string name = default, ref ptr <bytes.Buffer> buf = default)
 {
     this.h    = h;
     this.name = name;
     this.buf  = buf;
 }
 public clientHandshakeStateTLS13(ref ptr <Conn> c = default, ref ptr <serverHelloMsg> serverHello = default, ref ptr <clientHelloMsg> hello = default, ecdheParameters ecdheParams = default, ref ptr <ClientSessionState> session = default, slice <byte> earlySecret = default, slice <byte> binderKey = default, ref ptr <certificateRequestMsgTLS13> certReq = default, bool usingPSK = default, bool sentDummyCCS = default, ref ptr <cipherSuiteTLS13> suite = default, hash.Hash transcript = default, slice <byte> masterSecret = default, slice <byte> trafficSecret = default)
 {
     this.c             = c;
     this.serverHello   = serverHello;
     this.hello         = hello;
     this.ecdheParams   = ecdheParams;
     this.session       = session;
     this.earlySecret   = earlySecret;
     this.binderKey     = binderKey;
     this.certReq       = certReq;
     this.usingPSK      = usingPSK;
     this.sentDummyCCS  = sentDummyCCS;
     this.suite         = suite;
     this.transcript    = transcript;
     this.masterSecret  = masterSecret;
     this.trafficSecret = trafficSecret;
 }
Ejemplo n.º 7
0
Archivo: pss.cs Proyecto: zjmit/go2cs
 // Per RFC 8017, Section 9.1
 //
 //     EM = MGF1 xor DB || H( 8*0x00 || mHash || salt ) || 0xbc
 //
 // where
 //
 //     DB = PS || 0x01 || salt
 //
 // and PS can be empty so
 //
 //     emLen = dbLen + hLen + 1 = psLen + sLen + hLen + 2
 //
 private static (slice <byte>, error) emsaPSSEncode(slice <byte> mHash, long emBits, slice <byte> salt, hash.Hash hash)
 {
     slice <byte> _p0 = default;
     error        _p0 = default !;
Ejemplo n.º 8
0
 public serverHandshakeStateTLS13(ref ptr <Conn> c = default, ref ptr <clientHelloMsg> clientHello = default, ref ptr <serverHelloMsg> hello = default, bool sentDummyCCS = default, bool usingPSK = default, ref ptr <cipherSuiteTLS13> suite = default, ref ptr <Certificate> cert = default, SignatureScheme sigAlg = default, slice <byte> earlySecret = default, slice <byte> sharedKey = default, slice <byte> handshakeSecret = default, slice <byte> masterSecret = default, slice <byte> trafficSecret = default, hash.Hash transcript = default, slice <byte> clientFinished = default)
 {
     this.c               = c;
     this.clientHello     = clientHello;
     this.hello           = hello;
     this.sentDummyCCS    = sentDummyCCS;
     this.usingPSK        = usingPSK;
     this.suite           = suite;
     this.cert            = cert;
     this.sigAlg          = sigAlg;
     this.earlySecret     = earlySecret;
     this.sharedKey       = sharedKey;
     this.handshakeSecret = handshakeSecret;
     this.masterSecret    = masterSecret;
     this.trafficSecret   = trafficSecret;
     this.transcript      = transcript;
     this.clientFinished  = clientFinished;
 }