RSA encryption (asymmetric encryption) is used for Logon passwords when you use the single sign-on function of the general permission management system (girI Ga). For details about how to use this permission management system, refer.
For the front-end part, refer to the following js files:
<script type="text/javascript" src="ExtJS/jquery.js"></script><script type="text/javascript" src="ExtJS/BigInt.js" ></script><script type="text/javascript" src="ExtJS/RSA.js"></script><script type="text/javascript" src="ExtJS/Barrett.js"></script>
Download: http://files.cnblogs.com/hnsongbiao/ExtJS.zip
Main Code at the front end of the logon page:
setMaxDigits(129);var key = new RSAKeyPair("<%=strPublicKeyExponent%>", "", "<%=strPublicKeyModulus%>");var password = document.getElementById("password");var pwd = encryptedString(key, password.value);
Main function code in the background:
RSACryptoServiceProvider rsa = ] = rsa.ToXmlString(= rsa.ExportParameters(==)Session[[] results = rsa.Decrypt(HexStringToBytes(password), = = enc.GetString(results);
The following shows that the password has been encrypted through RSA asymmetric encryption (symmetric encryption is also implemented here)