(转).NET中获取字符串的MD5码

① 导入命名空间:

using System.Web.Security;

在本项目中的bin文件夹中添加System.Web的引用

② 获取MD5码:

string Password = FormsAuthentication.HashPasswordForStoringInConfigFile(TextBox1.Text.ToString(), "MD5");
posted @ 2011-02-21 15:39  李只蚊  阅读(258)  评论(0编辑  收藏  举报