note 22208 added to function.crypt

From: Date: Mon, 10 Jun 2002 19:20:17 +0000
Subject: note 22208 added to function.crypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-31673@lists.php.net to get a copy of this message
If you are trying to use the BLOWFISH method, the seed needs to be base64 encoded, but with a twist: blowfish uses a slightly modified base64 table (breaking the RFC). Since this is a seed, transposition of data shouldn't be a big issue, but: "+" needs to be replaced with "." otherwise your seed will stop at the "+" ... possibly creating a seed with entropy as low as ZERO! $base64salt = base64_encode($randomdata); $bf_safe_salt = str_replace("+", ".", $base64salt); -- http://www.php.net/manual/en/function.crypt.php http://master.php.net/manage/user-notes.php?action=edit+22208 http://master.php.net/manage/user-notes.php?action=delete+22208 http://master.php.net/manage/user-notes.php?action=reject+22208

« previous php.notes (#31673) next »