急求!!! asp,md5数据库加密 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select lower(right(sys.fn_varbintohexstr(hashbytes('MD5','admin')),32)) select bh,lower(right(sys.fn_varbintohexstr(hashbytes('MD5',sp)),32)) from a1 where bh='001' 明摆就是用在SQL中啊!!如果是要在ASP.NET中的话,可以参考下这个http://www.cnblogs.com/greatverve/archive/2010/05/06/1728515.html 楼主要用MD5加密数据库的什么东西呢MD5加密不可逆,所以一般只用来加密 密码给你个参考地址http://www.cnblogs.com/dgjack/archive/2010/12/30/1921492.html sql语句当然在数据库中用啊,查询分析中可以执行 C#之MD5加密函数. using System.Security.Cryptography; // MD5加密函数 private string cMD5(string text) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] originalBytes = Encoding.UTF8.GetBytes(text); byte[] computedBytes = md5.ComputeHash(originalBytes); StringBuilder sb = new StringBuilder(); foreach (byte b in computedBytes) { sb.Append(b.ToString("x2")); } return sb.ToString().ToUpper(); } 这两句有没有什么区别? 存储过程的问题 如何去掉整列内的中文. 根据选择的范围统计问题 SQL语句紧急求教 这个语句怎么写呢? 请帮忙给出一条优化的SQL语句 我的SQL SERVER2000的"全文索引"为什么总是为灰的 数据复制问题! mysql 里如何查询一张表里的所有子类 请问,如何获得两个表某列的"差内容”谢谢! 高手帮忙,两个表之间查询的SQL
select bh,lower(right(sys.fn_varbintohexstr(hashbytes('MD5',sp)),32)) from a1 where bh='001'
如果是要在ASP.NET中的话,可以参考下这个
http://www.cnblogs.com/greatverve/archive/2010/05/06/1728515.html
http://www.cnblogs.com/dgjack/archive/2010/12/30/1921492.html
private string cMD5(string text)
{
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
byte[] originalBytes = Encoding.UTF8.GetBytes(text);
byte[] computedBytes = md5.ComputeHash(originalBytes); StringBuilder sb = new StringBuilder();
foreach (byte b in computedBytes)
{
sb.Append(b.ToString("x2"));
} return sb.ToString().ToUpper();
}