Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Tshuva danielts86

View GitHub Profile
View gist:7bc729c00ebbb27f98d460b69eabd6e9
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;
}
You can’t perform that action at this time.