Skip to content

Instantly share code, notes, and snippets.

@hclewk
Created December 31, 2016 18:05
Show Gist options
  • Save hclewk/46cf5287b905710c5bb52c145a1f3f17 to your computer and use it in GitHub Desktop.
Save hclewk/46cf5287b905710c5bb52c145a1f3f17 to your computer and use it in GitHub Desktop.
Get MD5 Hash
public static string GetHash(string str)
{
using (var md5 = MD5.Create())
{
return BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes(str))).Replace("-", "").ToLower();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment