Re: crypt() and md5

From: Date: Mon, 23 Apr 2001 09:24:02 +0000
Subject: Re: crypt() and md5
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-49823@lists.php.net to get a copy of this message
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 >

« previous php.general (#49823) next »