public static string md5(string str) { MD5 md5 = MD5.Create(); byte[] buffer = Encoding.UTF8.GetBytes(str); byte[] md5Buffer = md5.ComputeHash(buffer); string newstr = ""; for(int i = 0; i < md5Buffer.Length; i++) { newstr += md5Buffer[i].ToString("x2"); } return newstr; }
本文为看恩吧原创文章,转载无需和我联系,但请注明来自knsay.com