Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This has been updated in the documentation at <a href="http://docs.php.net/manual/en/function.password-hash.php" rel="noreferrer">password_hash()</a> and will be updating shortly in the constants page (I just committed the documentation change about an hour or so ago).</p> <p>This will be live today at <a href="http://docs.php.net/manual/en/password.constants.php" rel="noreferrer">password.constants</a></p> <p>From the updated constants page (which hasn't gone live yet, but will be later today):</p> <p>Available algorithms:</p> <blockquote> <ul> <li><p><code>PASSWORD_BCRYPT (integer)</code></p> <p><code>PASSWORD_BCRYPT</code> is used to create new password hashes using the <code>CRYPT_BLOWFISH</code> algorithm.</p> <p>This will always result in a hash using the "$2y$" crypt format, which is always 60 characters wide.</p> <p>Supported Options:</p> <ul> <li><p>salt - to manually provide a salt to use when hashing the password. Note that this will override and prevent a salt from being automatically generated.</p> <p>If omitted, a random salt will be generated by password_hash() for each password hashed. This is the intended mode of operation.</p></li> <li><p>cost - which denotes the algorithmic cost that should be used. Examples of these values can be found on the crypt() page.</p> <p>If ommitted, a default value of 10 will be used. This is a good baseline cost, but you may want to consider increasing it depending on your hardware.</p></li> </ul></li> <li><p><code>PASSWORD_DEFAULT (integer)</code></p> <p>The default algorithm to use for hashing if no algorithm is provided. This may change in newer PHP releases when newer, stronger hashing algorithms are supported.</p> <p>It is worth noting that over time this constant can (and likely will) change. Therefore you should be aware that the length of the resulting hash can change. Therefore, if you use PASSWORD_DEFAULT you should store the resulting hash in a way that can store more than 60 characters (255 is the recomended width).</p> <p>Values for this constant:</p> <ul> <li>PHP 5.5.0 - PASSWORD_BCRYPT</li> </ul></li> </ul> </blockquote> <p>As far as when and how <code>PASSWORD_DEFAULT</code> will be updated, that's on the <a href="http://docs.php.net/manual/en/function.password-hash.php" rel="noreferrer"><code>password_hash()</code> documentation page</a>:</p> <blockquote> <p><strong>Note:</strong> Updates to supported algorithms by this function (or changes to the default one) must follow the following rules:</p> <ul> <li><p>Any new algorithm must be in core for at least 1 full release of PHP prior to becoming default. So if, for example, a new algorithm is added in 5.5.5, it would not be eligible for default until 5.7 (since 5.6 would be the first full release). But if a different algorithm was added in 5.6.0, it would also be eligible for default at 5.7.0.</p></li> <li><p>The default should only change on a full release (5.6.0, 6.0.0, etc) and not on a revision release. The only exception to this is in an emergency when a critical security flaw is found in the current default.</p></li> </ul> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload