日期:2014-05-17 浏览次数:20424 次
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); }