为什么Encrypt方法最多支持117个字节而不是128个字节?
下面的代码是117个a,再多一个a,就会报错。。。
而MSDN上的解释是说128字符...感谢大牛们参与
protected void Page_Load(object sender, EventArgs e){ RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); string pwd = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaa"; int a = Encoding.ASCII.GetBytes(pwd).Length; //int length = Encoding.Unicode.GetBytes(pwd).Length; byte[] Bytes = rsa.Encrypt(Encoding.ASCII.GetBytes(pwd), false);}