Page 1 of 1

Hiding the password in a MySQL table

Posted: Sun Jan 18, 2009 10:17 am
by Wilio
Now here is my problem.

I have builded a registering system that works as I want, only I don't want the password to show up as it is written in the password column. Why? It simply breaks the privacy of a user who wants to register.

I heard about base64_encode() and eval(), but I'm not sure if they come handy for what I want.

What's the best solution?

Re: Hiding the password in a MySQL table

Posted: Sun Jan 18, 2009 10:24 am
by jaoudestudios
Are you saying you dont want the password to be stored as plain text in the database?

Re: Hiding the password in a MySQL table

Posted: Sun Jan 18, 2009 10:34 am
by Wilio
In summary, yes.

Re: Hiding the password in a MySQL table

Posted: Sun Jan 18, 2009 10:50 am
by Mark Baker
Well the normal method is to hash it using a function like md5 or sha1.
base64 is easily reversible, and therefore inadequate for passwords

Re: Hiding the password in a MySQL table

Posted: Sun Jan 18, 2009 10:53 am
by Wilio
Mark Baker wrote:Well the normal method is to hash it using a function like md5 or sha1.
base64 is easily reversible, and therefore inadequate for passwords
Thanks, I didn't know about sha1. It's also quite easy to use.