public static string GetHashValue(byte[] content) { string hash; using (System.Security.Cryptography.SHA1CryptoServiceProvider sha = new System.Security.Cryptography.SHA1CryptoServiceProvider()) { hash = Convert.ToBase64String(sha.ComputeHash(content)); } return hash; }
Happy coding :)
No comments:
Post a Comment