Created
June 16, 2014 08:24
-
-
Save dkalamari/8db2d2fb0e77d64a716f to your computer and use it in GitHub Desktop.
SHA1 Encrypt
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
protected static String SHA1Encrypt(String phrase) | |
{ | |
UTF8Encoding encoder = new UTF8Encoding(); | |
SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider(); | |
byte[] hashedDataBytes = sha1.ComputeHash(encoder.GetBytes(phrase)); | |
return ByteArrayToString(hashedDataBytes); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment