ASP.NET中对字符串加密

//使用前添加此引用

using System.Web.Security;

//41位SHA1加密

SHA1.Text = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text,"SHA1");

//32位MD5加密

MD5.Text =FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "MD5") ;

posted on 2013-06-20 09:55  jinglikeblue  阅读(65)  评论(0)    收藏  举报

导航