MD5Helper

来源:互联网 发布:windows商城 编辑:程序博客网 时间:2024/04/28 16:39
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Security.Cryptography;namespace Helper{   public static partial class MD5Helper    {       public static string Encrypt(string pwd)       {           MD5 md5 = MD5.Create();           byte[] pwd2 =md5.ComputeHash( Encoding.UTF8.GetBytes(pwd));           StringBuilder sb = new StringBuilder();           for (int i = 0; i < pwd2.Length; i++)           {               sb.Append(pwd2[i].ToString("x2").ToLower());           }           return sb.ToString();                }    }}


                                             
0 0