C# winform32位加密算法
private string MD5(string source){
System.Security.Cryptography.MD5CryptoServiceProvider md5CSP=new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] md5Source=System.Text.Encoding.Unicode.GetBytes(source);
byte[] md5Out =md5CSP.ComputeHash(md5Source);
string sTemp="";
for ( int i =0; i < md5Out.Length; i++)
{
sTemp+=md5Out.ToString("x").PadLeft(2,'0');
}
return sTemp;
}
页:
[1]