Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Hiding password

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Hiding password

Postby largeinnit » Tue Apr 08, 2003 6:33 am

Hi,

I've developed a script to open an odbc access database using a password.

However the password for the access database is stored in an include file in plaintext format, what I want to do is find a way of storing the password in an encrypted value - so someone can't read the include file and get the password.

cheers

Dan
largeinnit
New php-forum User
New php-forum User
 
Posts: 2
Joined: Tue Apr 08, 2003 6:28 am

Postby Skeletor » Tue Apr 08, 2003 6:45 am

You could store the password in md5() format. Before writting it to the file, do:
$password = md5($password);

then when comparing another password against it, just md5 it before the comparison.

if (md5($password2) == $password) {
blah, blah, blah
}
Skeletor
New php-forum User
New php-forum User
 
Posts: 147
Joined: Tue Nov 19, 2002 7:47 am
Location: US, Ohio

md5 value

Postby largeinnit » Tue Apr 08, 2003 7:47 am

Hi,

sounds interesting, but would the access odbc recognize the md5 hash as the correct hash value for the password.
largeinnit
New php-forum User
New php-forum User
 
Posts: 2
Joined: Tue Apr 08, 2003 6:28 am


Return to PHP coding => General

Who is online

Users browsing this forum: adershvc, Google [Bot] and 7 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.