Beispiel #1
0
        public void GenerateEphemeralKeys(ICipherSetRemoteInfo remoteInfo)
        {
            CS1ARemoteInfo ri = (CS1ARemoteInfo)remoteInfo;

            ri.EphemeralKeys = ECKeyPair.Generate(SecNamedCurves.GetByName("secp160r1"));
            var hashToken = Helpers.SHA256Hash(ri.EphemeralKeys.PublicKey.Take(16).ToArray());

            ri.Token = hashToken.Take(16).ToArray();
        }
Beispiel #2
0
 public void Generate()
 {
     Key = ECKeyPair.Generate(SecNamedCurves.GetByName("secp160r1"));
 }