コード例 #1
0
        public static byte[] ComputeSharedKey(DHPrivateKey privateKey, DHPublicKey publicKey)
        {
            DiffieHellman dh = new DiffieHellmanManaged(privateKey.P, privateKey.G, privateKey.X);

            return(dh.DecryptKeyExchange(publicKey.KeyExchangeData));
        }
コード例 #2
0
ファイル: DHKeyPair.cs プロジェクト: heksesang/sharpotify
 public DHKeyPair(DHPrivateKey privateKey, DHPublicKey publicKey)
 {
     this._privateKey = privateKey;
     this._publicKey = publicKey;
 }
コード例 #3
0
 public DHKeyPair(DHPrivateKey privateKey, DHPublicKey publicKey)
 {
     this._privateKey = privateKey;
     this._publicKey  = publicKey;
 }
コード例 #4
0
ファイル: DH.cs プロジェクト: heksesang/sharpotify
 public static byte[] ComputeSharedKey(DHPrivateKey privateKey, DHPublicKey publicKey)
 {
     DiffieHellman dh = new DiffieHellmanManaged(privateKey.P, privateKey.G, privateKey.X);
     return dh.DecryptKeyExchange(publicKey.KeyExchangeData);
 }