public static string CodificaMD5(string txt) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] bs = Encoding.UTF8.GetBytes(txt); bs = md5.ComputeHash(bs); StringBuilder s = new StringBuilder(); foreach (byte b in bs) { s.Append(b.ToString("x2").ToLower()); } return s.ToString(); }
Nessun commento:
Posta un commento