note 22098 deleted from function.crypt by aidan

From: Date: Mon, 05 Jul 2004 10:25:20 +0000
Subject: note 22098 deleted from function.crypt by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72574@lists.php.net to get a copy of this message
Note Submitter: anonymous ---- Calling crypt() with only 1 argument appear to generate MD5 hash instead of DES with autogenerated salt nowadays, here's my solution: $mySalt = substr( ereg_replace("[^a-zA-Z0-9./]","", crypt(rand(10000000,99999999), rand(10,99))), 2, 2); echo "hash = ".crypt("mysecret",$mySalt);

« previous php.notes (#72574) next »