return strpos(static::
$ITOA64,
$setting[3
]);
} /**
* {@inheritdoc}
*/
public function hash(#[\SensitiveParameter] $password) {
if (isset($this->corePassword
)) { return $this->corePassword->
hash($password);
} return $this->
crypt('sha512',
$password,
$this->
generateSalt());
} /**
* {@inheritdoc}
*/
public function check(#[\SensitiveParameter] $password, #[\SensitiveParameter] $hash) {
if (substr($hash, 0, 2
) == 'U$'
) { // This may be an updated password from user_update_7000(). Such hashes
// have 'U' added as the first character and need an extra md5() (see the
// Drupal 7 documentation).
$stored_hash =
substr($hash, 1
);