日期:2014-05-19  浏览次数:20817 次

关于md5的一个问题
我新建了一个智能设备应用程序。数据库的数据是用md5加密了,我现在要用到md5这个类。为什么我都引用了   using   System.Security.Cryptography。干吗md5类还是用不了呢。如果不行,有什么好办法呢

------解决方案--------------------
up
------解决方案--------------------
encryptedPwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(password , "MD5 ");
------解决方案--------------------
限制这么多阿...
------解决方案--------------------
System.Security.Cryptography.MD5 md5 = MD5.Create();
byte[] by = md5.ComputeHash(Encoding.UTF8.GetBytes(str));
string str1= " ";
for (int i = 0; i < by.Length; i++)
{
str1= str1+ by[i].ToString( "X ");
}