public static byte[] ComputeSHA1Hash(this string input) { SHA1Internal sha1 = new SHA1Internal(); byte[] buffer = System.Text.Encoding.UTF8.GetBytes(input); sha1.HashCore(buffer, 0, buffer.Length); byte[] result = sha1.HashFinal(); sha1.Initialize(); return result; }