new crypt implementation, latest DES version used, blowfish support
| From: | Pierre Joye | Date: | Sat, 19 Jul 2008 22:15:56 +0000 |
| Subject: | new crypt implementation, latest DES version used, blowfish support | ||
| Groups: | php.internals.win | ||
| Request: | Send a blank email to internals-win+get-94@lists.php.net to get a copy of this message | ||
Hi,
Please find in the links ([1] and [2]) below an updated version of the
crypt rewrite and fix (#45430).
The changes are:
- Use of the latest DES implementation ported to windows (using
CriticalSection for the locking)
- Blowfish support with salt generation (could be used for non windows
build as well)
- moved all the crypt code to win32/crypt
- added COPYING info about the licenses of the various algorithms (no
new weird licenses introduced)
Please test it, I like to fix the last possible issues before a commit :)
Some tests (from the manual but the blowfish without salt):
if (CRYPT_STD_DES == 1) {
echo 'Standard DES: ' . crypt('rasmuslerdorf', 'rl') .
"\n";
}
if (CRYPT_EXT_DES == 1) {
echo 'Extended DES: ' . crypt('rasmuslerdorf', '_J9..rasm') .
"\n";
}
if (CRYPT_MD5 == 1) {
echo 'MD5: ' . crypt('rasmuslerdorf', '$1$rasmusle$') .
"\n";
}
if (CRYPT_BLOWFISH == 1) {
echo 'BLOWFISH: ' . crypt('rasmuslerdorf',
'$2a$07$rasmuslerd...........$') . "\n";
echo 'BLOWFISH: ' . crypt('rasmuslerdorf') . "\n"; /* Test
without salt */
}
[1] http://pierre.libgd.org/patches/php_5_3_crypt_win32.patch.txt
[2] http://pierre.libgd.org/patches/crypt20080720.zip
--
Pierre
http://blog.thepimp.net | http://www.libgd.org