I am trying to calculate a SHA-1 Hash from a string, but when I calculate the string using php\'s sha1 function I get something different than when I try it in C#. I need C#
This method in .NET is equivalent to sha1 in php:
string sha1Hash(string password) { return string.Join("", SHA1CryptoServiceProvider.Create().ComputeHash(Encoding.UTF8.GetBytes(password)).Select(x => x.ToString("x2"))); }