Sorry if my question is stupid but i am really curious. Now i saw a tutorial on how to hash passwords (strings in general) in C#. The tutor used
Encoding.Unicode.GetBytes("some string"); then he computed the hash of the resulting byte array using SHA1. Till now everything is ok, but then
he mentioned that we should convert the resulting byte array to hexadecimal format for storing in the database. For this he used the string builder
and the AppendFormat({0:x2}) method.
My question is: why not just store the byte array in the database instead of converting it first to hexadecimal ?
...
Go to the complete details ...