ActiveX网页信息加密
现在有些网站还在使用http协议,这样子在登录的时候由于http协议是没有加密功能的所以用户的密码很容易在发送到服务器途中被网络抓取到,或者是浏览器一般都会把用户的密码记录下来,这样就很危险了。如果我们在网页上输入的密码在被浏览器记录前或发送到服务器前通过ActiveX插件进行加密,这样可以起到信息安全作用。
#region JS调用方法 #region AES private const string aesKey = "12345678qwertyui";//AES秘钥 private const string aesVector = "987654321zxcvbnm";//AES向量 /// <summary> /// AES加密 /// </summary> /// <param name="data">要加密的明文</param> /// <returns></returns> public string AESEncrypt(string data) { return AES.AESEncrypt(data, Encoding.UTF8, aesKey, aesVector); } /// <summary> /// AES解密 /// </summary> /// <param name="data">要解密的密文</param> /// <returns></returns> public string AESDecrypt(string data) { return AES.AESDecrypt(data, Encoding.UTF8, aesKey, aesVector); } #endregion #region MD5 /// <summary> /// MD5加密 /// </summary> /// <param name="data">要加密的明文</param> /// <returns></returns> public string MD5Encrypt(string data) { return HashAlgorithmEncrypt.MD5Encrypt(data, Encoding.UTF8, HashAlgorithmEncrypt.Bit.bit16, HashAlgorithmEncrypt.UpperLower.Upper); } #endregion #region SHA1 /// <summary> /// SHA1加密 /// </summary> /// <param name="data">要加密的明文</param> /// <returns></returns> public string SHA1Encrypt(string data) { return HashAlgorithmEncrypt.SHA1Encrypt(data, Encoding.UTF8, HashAlgorithmEncrypt.UpperLower.Upper); } #endregion #endregion
源码下载地址:ActiveX信息加密插件.zip
相关推荐
wwzaqw 2020-11-11
kldy00 2020-11-03
VinFOSSIDce 2020-11-02
kldy00 2020-10-29
VinFOSSIDce 2020-10-28
nodid 2020-10-28
硕鼠 2020-10-26
TifaBest 2020-10-25
weigenzongderoot 2020-10-14
fzxhsaj 2020-10-14
xuyoucheng00 2020-09-26
网络菜市场 2020-09-23
Veechange 2020-09-01
VinFOSSIDce 2020-08-24
智链ChainNova 2020-08-17
Jantywei 2020-08-13
gcttong00 2020-08-13
gcttong00 2020-08-11
xiaoemo0 2020-08-09