Re: Encrypting a column (password column)

From: Date: Tue, 19 Dec 2000 04:51:03 +0000
Subject: Re: Encrypting a column (password column)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-5333@lists.php.net to get a copy of this message
On 18 Dec 2000 17:21:33 -0800, noahsw@cyberdude.com ("Noah Spitzer-Williams") wrote: >Hey, i have a user database in which one of the columns of a table is their >password. however i would like to have this encrypted just so when i look at >it using somethin like phpmyadmin, their password isnt visible. is there an >easy way to do this? Really depends what you want to use the password for and how strong you need it. The mySQL PASSWORD() should be fine for some things. When you do your INSERT use PASSWORD('password'). Then you woudl do the same thing for your selects. If it will be for htaccess, it is probably best to acutally store it in that format. Just a speed issue there. If on the other hand, you are using it for a web site interface that you are writing or improving, you might want to look at storing the md5 hash[2]. This would definitely be the strongest of the three. Hope that helps, Michael [1] http://www.php.net/manual/function.md5.php -- Michael Brunson 504.473.6643 brunson@intercosmos.com ICQ: 83163789 <? Special Projects Programming Manager ?> --- Intercosmos Media Group, Inc. --- www.intercosmos.com www.directnic.com

« previous php.db (#5333) next »