|
Posted by salmobytes on 11/23/07 18:47
On Nov 23, 8:47 am, Acrobatic <jbn...@gmail.com> wrote:
> I'm trying to store user passwords in a MySQL database. I learned the
> hard way that using MySQL "DECODE" and "ENCODE" doesn't seem to work
> cross-platform, but if I encrypt on the server side with PHP's md5
> function, will it work cross-platform (or cross-processor?)
>
> Thank you for any advice
Not exactly your question, but an often useful tidbit none-the-less:
On a linux server, if you want to generate an md5hash
from the command line, that would duplicate what would also
be generated from php, you have to remember to echo -n
(print to the console without a newline at the end of your string).
I do this, for instance, when manually adding new users into
an authentication database.
`echo -n obama` produces the same hash as md5("obama") in php.
`echo obama` does not......
[Back to original message]
|