Created
May 1, 2013 08:41
-
-
Save FernandoVezzali/5494352 to your computer and use it in GitHub Desktop.
This file contains 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
public static String Sha1(String plainText) | |
{ | |
Byte[] text, hashBytes; | |
using (SHA1Managed sha1 = new SHA1Managed()) | |
{ | |
text = Encoding.Unicode.GetBytes(plainText); | |
hashBytes = sha1.ComputeHash(text); | |
} | |
return Convert.ToBase64String(hashBytes); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment