C# 急急~!!

来源:百度知道 编辑:UC知道 时间:2024/06/22 11:11:50
各位高手,小弟急求登录时加密的代码
用C# 2005或2008写的
马上要交作业了,希望各位帮帮我
急需原代码 ,谢谢~~

String pwd=System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Txt_Pwd.Value.Trim(), "sha1");//sha1加密

String pwd=System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Txt_Pwd.Value.Trim(), "Md5");//MD5加密

Txt_Pwd.Value.Trim()换为你的密码文本框

select * from tablename where username=**** AND password=pwd

需要的话·我就给你一段MD5加密的代码·