For PHP prior to 5.3.0 crypt (), the lib provided by the OS is used. If you are using an earlier version, you will need to check the documentation of your OS to see if it is supported (check the value of the CRYPT_BLOWFISH constant) - if not, then the algorithm is implemented in the mcrypt () extension for PHP.
The example you quoted from the docs doesn't seem to make much sense:
$stored_password=fetch_password($user); if (crypt($_REQUEST['password'],$stored_password)===$stored_password) { // note that crypt automatically extracts the salt and alogrithm type // from $stored_password ....
When creating a password, you only need to specify the prefix ($ 2a $).
NTN
FROM.
source share