Quote from: David on December 29, 2002, 02:03:19 AMI still don't think you get what I said. It uses as you said a RANDOM salt. This salt is different every time you call crypt. Thus how would you ever compare an entered password and the one in the database?
The random salt is included in the crypted form of the password. Therefore, you must provide the crypted form (or at least the salt extracted from the crypted form) upon crypting the user input. This way the user input can be crypted with the same salt that was previously used.
For example with DES, the salt is included as the first two characters of the encrypted form. [That's why with the old scheme, every encrypted password started with the same two characters as the clear password: because those characters were used as salt]
This works, my mod's there to prove it! For more info, check any documentation on the standard crypt function...
Regards, Bruno.