1
Hello, I am creating a system that has a user registration area on the system. In the password part I use md5() to transform the characters into Hash.
Only I’m noticing the following, sometimes I insert a character set and the same character set is being stored and displayed with hashes (I don’t know if that’s the plural) different.
For example: The character set 505987.
In the database he gives me the following hash:
Now if I give an echo of that field in my PHP gives the following output:
I wonder if that’s normal ?
And I would also like to know if I were to perhaps make a comparison between these two data at some point, it could go wrong or would go well.
Can the same character set have different hashes ?
I’m sorry if I couldn’t be clear.
UPDATING: It seems that when I type in the form generates a right Hash than when I do a query in the database, I take this field that has the hash stored and stored in a variable and then display this variable.
Hash algorithms are applied to bits.. if you hash an integer or a string that represents this number, the results will be different because the representation of these values in bits is different. That said, the way strings are converted into bits depends on the encoding. It would be nice if you checked if the data type is the same. :)
– fernandosavio