.net中采用sha和md5进行散列加密(源代码)
/// <summary>
///得到指定字符串用.net的MD5和Sha1加密后的字符串
/// </summary>
/// <param name="SourceString">需要加密的字符串</param>
/// <returns>返回加密后的字符串</returns>
public string GetEnNetCode(string SourceString)
{
string TempString;
TempString=FormsAuthentication.HashPasswordForStoringInConfigFile(SourceString,"sha1");
TempString=FormsAuthentication.HashPasswordForStoringInConfigFile(TempString,"md5");
return TempString;
}