.NET中获取字符串的MD5码

① 导入命名空间:

C#代码 复制代码  收藏代码
  1. using System.Web.Security;  
 using System.Web.Security;



② 获取MD5码:

C#代码 复制代码  收藏代码
  1. string Password = FormsAuthentication.HashPasswordForStoringInConfigFile(TextBox1.Text.ToString(), "MD5");  

转自:http://niunan.iteye.com/blog/261313

你可能感兴趣的:(.net)