Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Drupal 8 and Drupal 7 use SHA512 by default with a salt. They run the hash through PHP's <a href="http://www.php.net/manual/en/function.hash.php" rel="noreferrer">hash</a> function numerous times to increase the computation cost of generating a password's final hash (a security technique called <a href="http://en.wikipedia.org/wiki/Key_stretching" rel="noreferrer">stretching</a>).</p> <p>With Drupal 8, the implementation is object oriented. There is a <a href="http://api.drupal.org/api/drupal/core!lib!Drupal!Core!Password!PasswordInterface.php/interface/PasswordInterface/8" rel="noreferrer">PasswordInterface</a> which defines a hash method. The default implementation of that interface is in the <a href="https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Password!PhpassHashedPassword.php/class/PhpassHashedPassword/8" rel="noreferrer">PhpassHashedPassword</a> class. That class' <a href="http://api.drupal.org/api/drupal/core!lib!Drupal!Core!Password!PhpassHashedPassword.php/function/PhpassHashedPassword::hash/8" rel="noreferrer">hash</a> method calls the <a href="http://api.drupal.org/api/drupal/core!lib!Drupal!Core!Password!PhpassHashedPassword.php/function/PhpassHashedPassword::crypt/8" rel="noreferrer">crypt</a> method passing in SHA512 as the hashing algorithm, a password, and a generated salt. The class' crypt method is nearly the same as Drupal 7's <a href="http://api.drupal.org/api/drupal/includes!password.inc/function/_password_crypt/7" rel="noreferrer">_password_crypt()</a> method.</p> <p>With Drupal 7, the implementation is split into a couple global functions: <a href="http://api.drupal.org/api/drupal/includes--password.inc/function/user_hash_password/7" rel="noreferrer">user_hash_password()</a> and <a href="http://api.drupal.org/api/drupal/includes--password.inc/function/_password_crypt/7" rel="noreferrer">_password_crypt()</a>.</p> <p>Drupal 6 uses MD5 without a salt. The relevant function is <a href="http://api.drupal.org/api/drupal/modules--user--user.module/function/user_save/6" rel="noreferrer">user_save()</a>.</p>
    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.
    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