I want to get text inputted by the user into the maskedTextBox and then encode it into byte[] which will be hashed into SHA256 to compare with password hashes stored at my database. The problem is that I’ve only found .GetCharFromPosition(Point pt) which I don’t know how to use (I would know if it would be a simple index in place of this “Point”) and .GetHashCode but it needs to be SHA256, not some undefined hash…
Share
You can get the bytes of a string in a certain encoding using
Encoding.GetBytes. For example, to get it as an array of bytes as UTF-8: