<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script> <script src="Scripts/jQuery.md5.js" type="text/javascript" ></script> <script src="Scripts/BigInt.js" type="text/javascript"></script> <script src="Scripts/RSA.js" type="text/javascript"></script> <script src="Scripts/Barrett.js" type="text/javascript"></script> <script type="text/javascript"> function cmdEncrypt() { setMaxDigits(129); var key = new RSAKeyPair("<%=strPublicKeyExponent%>", "", "<%=strPublicKeyModulus%>"); var pwdMD5Twice = $.md5($.md5($("#txtPassword").attr("value"))); var pwdRtn = encryptedString(key, pwdMD5Twice); $("#encrypted_pwd").attr("value", pwdRtn); $("#formLogin").submit(); return; } </script>
类库JS:
http://www.ohdave.com/rsa/
其他参考:
http://yajiao.iteye.com/blog/1772680
http://www.cnblogs.com/guogangj/archive/2012/03/05/2381117.html
时间: 2024-10-10 07:04:01