3 ms·
I'm not a database specialist, so I hope you will allow me to ask a daft question. Why, in the user table is the password held as a TinyBLOB. To allow for Unico
by Angostura 18y ago
I'm not a database specialist, so I hope you will allow me to ask a daft question. Why, in the user table is the password held as a TinyBLOB. To allow for Unicode, or somesuch?
- Ezra 18y agoIn this case, the password field doesn't hold just a password, or a rot13 of a password, or even a digest of a password. user_password is a concatenated md5 hash of user_id, a hyphen (-), and md5 hash of current password. ie. MD5(CONCAT(user_id, "-", MD5("PASSWORD"))) The reason for this is security, obviously. The tinyblob then, is used for convenience/efficiency; it's a good way to store a hash. They might also do some tricks on the data (ie. convert to base 64 before it's stored, or something like that), but that's the general idea.
- Angostura 18y agoHead-slap "of course" Thanks for taking the time Ezra.