Guest User

Untitled

a guest
May 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. public static string MD5Hash(string input)
  2. {
  3. StringBuilder hash = new StringBuilder();
  4. MD5CryptoServiceProvider md5provider = new MD5CryptoServiceProvider();
  5. byte[] bytes = md5provider.ComputeHash(new UTF8Encoding().GetBytes(input));
  6.  
  7. for (int i = 0; i < bytes.Length; i++)
  8. {
  9. hash.Append(bytes[i].ToString("x2"));
  10. }
  11. return hash.ToString();
  12. }
Add Comment
Please, Sign In to add comment