Exemplo n.º 1
0
 public DHKey GenerateKeyPair()
 {
     Key = new DHKey();
     DiffieHellmann.GenerateKey(Group, Prime, ref Key.Private, ref Key.Public);
     return(Key);
 }
Exemplo n.º 2
0
 public byte[] GetSharedSecret(byte[] otherPubKey)
 {
     return(DiffieHellmann.ComputeKey(Group, Prime, Key.Private, otherPubKey));
 }