本来我也以为System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile中的MD5和常用的一样 一看MSDN的解释,原来是 Given a password and a string identifying the hash type, this routine produces a hash password suitable for storing in a configuration file. 大家不要用HashPasswordForStoringInConfigFile取得的加密保存在数据库中,这个只适合保存在配置文件中, 在需要验证的时候,会自动根据加密方式验证。 环境:vs.net2005/sql server2000/xp测试通过1.MD5 16位加密实例 using System;using System.Collections.Generic;using System.Text;using System.Security.Cryptography;namespace md5 相关文章: