Created
November 15, 2011 09:06
-
-
Save madd0/1366511 to your computer and use it in GitHub Desktop.
Revisions
-
madd0 revised this gist
Nov 16, 2011 . 1 changed file with 9 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,11 @@ public static string MD5Hash(string toHash) { string hashed; using (MD5 md5 = MD5.Create()) { hashed = string.Join(string.Empty, md5.ComputeHash(Encoding.UTF8.GetBytes(toHash)).Select(b => b.ToString("x2"))); } return hashed; } -
madd0 created this gist
Nov 15, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ string toHash = "my string to hash"; string hashed; using (MD5 md5 = MD5.Create()) { hashed = string.Join(string.Empty, md5.ComputeHash(Encoding.UTF8.GetBytes(toHash)).Select(b => b.ToString("x2"))); }