首页 > 其他 > 详细

MD5 加密方法(HashPasswordForStoringInConfigFile)过时

时间:2018-01-26 23:40:58      阅读:333      评论:0      收藏:0      [点我收藏+]
过时写法:
string truePwd = FormsAuthentication.HashPasswordForStoringInConfigFile(strPassWord, "MD5");

替换成如下写法即可:
System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create();
string truePwd = BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes(strPassWord + "asdfds!@#$1234@!#$ASDFasdfQ@#4345asDF"))).Replace("-", null);

            

MD5 加密方法(HashPasswordForStoringInConfigFile)过时

原文:https://www.cnblogs.com/skye-mei/p/8361754.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!