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
byte[] HashSHA1(string phrase) | |
{ | |
if (phrase == null) | |
return null; | |
var encoder = new UTF8Encoding(); | |
var sha1Hasher = new SHA1CryptoServiceProvider(); | |
var hashedDataBytes = sha1Hasher.ComputeHash(encoder.GetBytes(phrase)); | |
return hashedDataBytes; | |
} |