Need help with convert this function
public static string CalculatePassHashBnet(string name, string password)
{
//Hash Calculate system (Bnet Users)
SHA256 sha256 = SHA256.Create();
var nameHash = sha256.ComputeHash(Encoding.UTF8.GetBytes(name));
return sha256.ComputeHash(Encoding.UTF8.GetBytes(nameHash.ToHexString() + ":" + password)).ToHexString(true);
}
Public Shared Function CalculatePassHashBnet(ByVal name As String, ByVal password As String) As String
'Hash Calculate system (Bnet Users)
Dim sha256 As SHA256 = SHA256.Create()
Dim nameHash = sha256.ComputeHash(Encoding.UTF8.GetBytes(name))
Return sha256.ComputeHash(Encoding.UTF8.GetBytes(nameHash.ToHexString() & ":" & password)).ToHexString(True)
End Function
but i got underline for .ToHexString() i did not manage to make it correct