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(); }
public void Generate() { Key = ECKeyPair.Generate(SecNamedCurves.GetByName("secp160r1")); }