public KeyExchange(byte[] publicKey, AsymmetricCryptoKey privateKey, string hashAlgo) { _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); }
public SecureChannelHandshakeKeyExchange(byte[] publicKey, AsymmetricCryptoKey privateKey, string hashAlgo) : base(SecureChannelCode.None) { _publicKey = publicKey; _signature = privateKey.Sign(new MemoryStream(_publicKey, false), hashAlgo); }