title: Login with Hash md5(md5)
body: <p>i'm a newbie. Now, i have a problem with 2 database user login. I have a DB1 and passwords hash md5(md5) . DB2 is OJS (open journal system). I want to use acount of DB1 to login to OJS. I know, when i login on OJS, system will hash the input string from validation form and compare with DB. I want change the type hash to sample DB1 md5(md5).</p>
  
  <pre><code>function verifyPassword($username, $password, $hash, &amp;$rehash) {
      if (password_needs_rehash($hash, PASSWORD_BCRYPT)) {
          // update to new hashing algorithm
          $oldHash = Validation::encryptCredentials($username, $password, false, true);
  
          if ($oldHash === $hash) {
              // update hash
              $rehash = Validation::encryptCredentials($username, $password);
  
              return true;
          }
      }
  
      return password_verify($password, $hash);
  }
  </code></pre>
  
  <p>DB1 hash</p>
  
  <pre><code>md5(md5($pass))
  </code></pre>