I try to rewrite the following C# method to SQL Server 2014 code. So far to no avail.
public static string GetHash(string input)
{
HashAlgorithm hashAlgorithm = new SHA256CryptoServiceProvider();
byte[] byteValue = System.Text.Encoding.UTF8.GetBytes(input);
byte[] byteHash = hashAlgorithm.ComputeHash(byteValue);
return Convert.ToBase64String(byteHash);
}
Especially the encoding to UTF8 gives me trouble.
I appreciate any help.