public static string AsString(this RSAParameters parameter) { //return parameter.Modulus // + parameter.Exponent // + parameter.D // + parameter.P // + parameter.DP // + parameter.DQ // + parameter. return(parameter.GetHashCode().ToString()); }
public static void createRSAKey() { // Create an instane of the RSA Algorithm object RSACryptoServiceProvider myRSA = new RSACryptoServiceProvider(); // Create a new RSAParameters object with only the public key RSAParameters publicKey = myRSA.ExportParameters(false); Console.WriteLine(publicKey.Exponent.ToString()); Console.WriteLine(publicKey.Modulus.ToString()); Console.WriteLine(publicKey.GetHashCode().ToString()); }