We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi..
Why rsaKey.PublicKey == rsaKey.PrivateKey
var rsaKey = EncryptProvider.CreateRsaKey(RsaSize.R4096);
string _publicKey = rsaKey.PublicKey; JObject _jo_public_key = JObject.Parse(_publicKey); string _public_key = (string)_jo_public_key["Modulus"]; var _privateKey = rsaKey.PrivateKey; JObject _jo_private_key = JObject.Parse(_privateKey); string _private_key = (string)_jo_private_key["Modulus"];
The text was updated successfully, but these errors were encountered:
The modulus same don't mean the privateKey equal publickKey.
internal static string ToJsonString(this RSA rsa, bool includePrivateParameters) { RSAParameters parameters = rsa.ExportParameters(includePrivateParameters); var parasJson = new RSAParametersJson() { Modulus = parameters.Modulus != null ? Convert.ToBase64String(parameters.Modulus) : null, Exponent = parameters.Exponent != null ? Convert.ToBase64String(parameters.Exponent) : null, P = parameters.P != null ? Convert.ToBase64String(parameters.P) : null, Q = parameters.Q != null ? Convert.ToBase64String(parameters.Q) : null, DP = parameters.DP != null ? Convert.ToBase64String(parameters.DP) : null, DQ = parameters.DQ != null ? Convert.ToBase64String(parameters.DQ) : null, InverseQ = parameters.InverseQ != null ? Convert.ToBase64String(parameters.InverseQ) : null, D = parameters.D != null ? Convert.ToBase64String(parameters.D) : null }; return JsonConvert.SerializeObject(parasJson); }
Sorry, something went wrong.
No branches or pull requests
Hi..
Why rsaKey.PublicKey == rsaKey.PrivateKey
var rsaKey = EncryptProvider.CreateRsaKey(RsaSize.R4096);
The text was updated successfully, but these errors were encountered: