svn: /phpdoc/en/trunk/reference/strings/functions/ crypt.xml
| From: | Joey Smith | Date: | Sun, 21 Feb 2010 03:32:45 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/strings/functions/ crypt.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-6112@lists.php.net to get a copy of this message | ||
joey Sun, 21 Feb 2010 03:32:45 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=295298
Log:
Merge changes suggested by Solar Designer to clarify
how EDES and Blowfish salts work.
Changed paths:
U phpdoc/en/trunk/reference/strings/functions/crypt.xml
Modified: phpdoc/en/trunk/reference/strings/functions/crypt.xml
===================================================================
--- phpdoc/en/trunk/reference/strings/functions/crypt.xml 2010-02-21 02:49:12 UTC (rev 295297)
+++ phpdoc/en/trunk/reference/strings/functions/crypt.xml 2010-02-21 03:32:45 UTC (rev 295298)
@@ -51,9 +51,9 @@
</listitem>
<listitem>
<simpara>
- <constant>CRYPT_EXT_DES</constant> - Extended DES-based encryption. The
"salt" is a
- 9-character string consisting of an underscore followed by 4 bytes of iteration count and 4
- bytes of salt. These are encoded as printable characters, 6 bits per character, least
+ <constant>CRYPT_EXT_DES</constant> - Extended DES-based encryption. The
"salt" is a
+ 9-character string consisting of an underscore followed by 4 bytes of iteration count and
+ 4 bytes of salt. These are encoded as printable characters, 6 bits per character, least
significant character first. The values 0 to 63 are encoded as "./0-9A-Za-z".
</simpara>
</listitem>
@@ -67,10 +67,11 @@
<simpara>
<constant>CRYPT_BLOWFISH</constant> - Blowfish encryption with a salt as follows:
"$2a$", a two digit cost parameter, "$", and 22 base 64 digits from the
alphabet
- "./0-9A-Za-z". Using characters outside of this range in the salt will cause crypt()
to return
- a zero-length string. The two digits set the cost parameter, where the output will be fed back
- into the Blowfish cipher 2^cost times. The cost parameter must be in range 04-31, values
outside
- this range will cause crypt() to select DES-based encryption instead, with a salt of
'$2'.
+ "./0-9A-Za-z". Using characters outside of this range in the salt will cause crypt()
to
+ return a zero-length string. The two digit cost parameter is the base-2 logarithm of the
+ iteration count for the underlying Blowfish-based hashing algorithmeter and must be in
+ range 04-31, values outside this range will cause crypt() to select DES-based encryption
+ instead, with a salt of '$2'.
</simpara>
</listitem>
<listitem>