如何让RSA加密相同的文本,密文每次不一样?
110来电 2012-06-15 10:51:18 rsa.FromXmlString(PRIVATE_KEY);
System.Security.Cryptography.RSAPKCS1SignatureFormatter f =
new System.Security.Cryptography.RSAPKCS1SignatureFormatter(rsa);
f.SetHashAlgorithm("SHA1");
Byte[] source = System.Text.ASCIIEncoding.ASCII.GetBytes(comboBox1.Text);
System.Security.Cryptography.SHA1Managed sha = new System.Security.Cryptography.SHA1Managed();
Byte[] result = sha.ComputeHash(source);
Byte[] regkey = f.CreateSignature(result);
richTextBox1.Text = Convert.ToBase64String(regkey);