asp.net--MD5加密

// MD5加密
public   static   string  GetMD5Code( string  text)
{
    
byte[] inBytes = System.Text.Encoding.Default.GetBytes(text);
    System.Security.Cryptography.MD5CryptoServiceProvider md 
= new System.Security.Cryptography.MD5CryptoServiceProvider();
    
byte[] outBytes = md.ComputeHash(inBytes);
    
string s = BitConverter.ToString(outBytes);
    
return s;
}

你可能感兴趣的:(asp.net)