note 71748 added to function.crypt
| From: | tserong at sgi dot com | Date: | Thu, 14 Dec 2006 08:18:40 +0000 |
| Subject: | note 71748 added to function.crypt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120598@lists.php.net to get a copy of this message | ||
Blowfish doesn't use a sixteen character salt, it uses sixteen *bytes* of salt. So (courtesy
of the docs for the Crypt::Eksblowfish::Bcrypt Perl module), it's:
"$2", optional "a", "$", two digits, "$", and 22 base 64
digits
If the salt is not long enough, crypt will return "*0" and you will have no idea what is
wrong. Interestingly, the example in the documentation with a trailing '$' in the salt
does not work. Replace the '$' with a '.', and the output appears as
advertised.
----
Server IP: 64.71.164.2
Probable Submitter: 61.14.27.42
----
Manual Page -- http://www.php.net/manual/en/function.crypt.php
Edit -- https://master.php.net/note/edit/71748
Del: integrated -- https://master.php.net/note/delete/71748/integrated
Del: useless -- https://master.php.net/note/delete/71748/useless
Del: bad code -- https://master.php.net/note/delete/71748/bad+code
Del: spam -- https://master.php.net/note/delete/71748/spam
Del: non-english -- https://master.php.net/note/delete/71748/non-english
Del: in docs -- https://master.php.net/note/delete/71748/in+docs
Del: other reasons-- https://master.php.net/note/delete/71748
Reject -- https://master.php.net/note/reject/71748
Search -- https://master.php.net/manage/user-notes.php