Reply to Re: Does MD5 work cross-platform?

Your name:

Reply:


Posted by salmobytes on 11/23/07 18:48

On Nov 23, 11:47 am, salmobytes <Sandy.Pittendr...@gmail.com> wrote:
> 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......

echo -n obama | md5sum that is

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация