public static string CalculateSHA1(string text, Encoding enc)
{
byte[] buffer = enc.GetBytes(text);
SHA1CryptoServiceProvider cryptoTransformSHA1 = new SHA1CryptoServiceProvider();
string hash = BitConverter.ToString(cryptoTransformSHA1.ComputeHash(buffer)).Replace("-", "");
return hash;
}
THANKS!
VStudio keeps yelling at me for just what I have so far most specifically the bracket at the end of Byte?:
Private Sub CalculateSHA1(ByVal text As String, ByVal enc As Encoding)
Dim buffer As Byte[] = enc.GetBytes(text);
End Sub