Пример #1
0
 public KeyExchange(byte[] publicKey, AsymmetricCryptoKey privateKey, string hashAlgo)
 {
     _publicKey = publicKey;
     _signature = privateKey.Sign(new MemoryStream(_publicKey, false), hashAlgo);
 }
Пример #2
0
 public KeyExchange(string publicKeyXML, AsymmetricCryptoKey privateKey, string hashAlgo)
 {
     _publicKeyXML = publicKeyXML;
     _signature    = privateKey.Sign(new MemoryStream(Encoding.UTF8.GetBytes(_publicKeyXML), false), hashAlgo);
 }
Пример #3
0
 public SecureChannelHandshakeKeyExchange(byte[] publicKey, AsymmetricCryptoKey privateKey, string hashAlgo)
     : base(SecureChannelCode.None)
 {
     _publicKey = publicKey;
     _signature = privateKey.Sign(new MemoryStream(_publicKey, false), hashAlgo);
 }
 public KeyExchange(string publicKeyXML, AsymmetricCryptoKey privateKey, string hashAlgo)
 {
     _publicKeyXML = publicKeyXML;
     _signature = privateKey.Sign(new MemoryStream(Encoding.UTF8.GetBytes(_publicKeyXML), false), hashAlgo);
 }