hammerslane
10-27-2005, 09:36 AM
Hi guys
Can somebody help me understand how .htaccess encrypts/hashes a password which a user submits, to compare it to the one in .htpasswd?
I'm using PHP to create a .htpasswd file, but I'm not sure what the normal 'salt' a web server uses is.
At the moment, I'm going$password=crypt($_POST['password'],CRYPT_STD_DES);and then putting $username. ":" .$password at the end of the .htpasswd file. That never seems to generate the correct password hash in the .htpasswd file though.
So, can someone tell me how a server hashes a submitted password?
Many thanks,
A confused .htpasswd newbie
Can somebody help me understand how .htaccess encrypts/hashes a password which a user submits, to compare it to the one in .htpasswd?
I'm using PHP to create a .htpasswd file, but I'm not sure what the normal 'salt' a web server uses is.
At the moment, I'm going$password=crypt($_POST['password'],CRYPT_STD_DES);and then putting $username. ":" .$password at the end of the .htpasswd file. That never seems to generate the correct password hash in the .htpasswd file though.
So, can someone tell me how a server hashes a submitted password?
Many thanks,
A confused .htpasswd newbie