Hiding password

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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

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

User avatar
Skeletor
New php-forum User
New php-forum User
Posts: 147
Joined: Tue Nov 19, 2002 7:47 am
Location: US, Ohio
Contact:

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
}

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

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.


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 2 guests

cron