If your system's crypt() function supports standard DES crypt, then that
will be the default if you do not supply a salt.  PHP will generate a
random DES salt for you.  If you supply your own random MD5 salt and your
system's crypt() function supports MD5, then it will generate an
md5-encrypted string.  That's just the way it works.

If you want PHP to always default to md5 crypt and generate random md5
salts for you then you should undefine PHP_STD_DES_CRYPT in php_config.h
and recompile PHP.

-Rasmus

On Mon, 23 Apr 2001, Niklas Neumann wrote:

> Hy,
>
> > That means that you do have MD5 crypt() support.  If you simply provide a
> > salt that starts with $1$ you should get an md5-encrypted password.
>
> I know how to do it manually. But isn't crypt supposed to choose MD5-hashing
> if it is available on the system php is running on?
> I use PHP 4.0.4pl1 and md5 support is definitively available.
>
> Btw.
>
> > $1$rZelmysN$Gj0rbqD76STIotGExxpna1
> > ^^^^^^^^^^^^
> >   SALT
>
> Isn't this just a 8 chars SALT (rZelmysN)?
>
>
> Best regards
>   Niklas Neumann
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to