crypt salt question
- From: andras@xxxxxxxxx ("Andras Kende")
- Date: Thu, 30 Aug 2007 14:42:20 -0700
Hello,
I'm trying to move some app from postgresql to mysql but unable to find out
how to authenticate
against the current crypted passwords with php..
insert to database:
$cset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
$salt = substr($cset, time() & 63, 1) . substr($cset, time()/64 & 63, 1);
$password = crypt($password, $salt); //pass crypted version of password
for further processing
$result = pg_query ("INSERT INTO users (username, password) VALUES
('$username', '$password')");
I read the crypt is one way encryption but how to compare the password
entered with the encrypted
version if don't know the salt ??
Thanks,
Andras
- Follow-Ups:
- RE: [PHP] crypt salt question
- From: "Jan Reiter"
- Re: [PHP] crypt salt question
- From: "Satyam"
- RE: [PHP] crypt salt question
- Prev by Date: Re: [PHP] Reload page after form submit
- Next by Date: Re: [PHP] crypt salt question
- Previous by thread: Compiling PHP 5.2.3
- Next by thread: Re: [PHP] crypt salt question
- Index(es):