Created
February 4, 2016 13:49
-
-
Save davidmdem/4acf783a3ee2742a21fb to your computer and use it in GitHub Desktop.
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 characters
| string emailHash; | |
| using (var md5 = MD5.Create()) | |
| { | |
| var sb = new StringBuilder(); | |
| var data = md5.ComputeHash(Encoding.UTF8.GetBytes("myemail@email.com")); | |
| foreach (byte t in data) | |
| { | |
| sb.Append(t.ToString("x2")); | |
| } | |
| emailHash = sb.ToString(); | |
| } | |
| return $"http://www.gravatar.com/avatar/{emailHash}?s=30&d=mm"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment