|
Thank you for all your help. It finally works!
Just one thing still not very clear to me (I am a bit slow): NitroPhil mentioned that I can use the encrypted password as the salt. On php manual, it's said this can avoid problems when different algorithms are used. All the encrypted passwords in my htpasswd file are 13 characters long. How can crypt() distinguish if the password is "DES-based password hashing" or "MD5-based"? Doesn't it just check both and see whichever gives the right password?
|