‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashInterface:
TYPO3\CMS\Core\Crypto\PasswordHashing\AbstractArgon2PasswordHash TYPO3\CMS\Core\Crypto\PasswordHashing\BcryptPasswordHash TYPO3\CMS\Core\Crypto\PasswordHashing\BlowfishPasswordHash TYPO3\CMS\Core\Crypto\PasswordHashing\Md5PasswordHash TYPO3\CMS\Core\Crypto\PasswordHashing\Pbkdf2PasswordHash TYPO3\CMS\Core\Crypto\PasswordHashing\PhpassPasswordHash TYPO3\CMS\Core\Tests\Unit\Authentication\Mfa\Provider\Fixtures\Crypto\PasswordHashing\NoopPasswordHash TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2idPasswordHash TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2iPasswordHash

Public Member Functions

bool checkPassword (string $plainPW, string $saltedHashPW)
 
bool isAvailable ()
 
string null getHashedPassword (string $password)
 
bool isHashUpdateNeeded (string $passString)
 
bool isValidSaltedPW (string $saltedPW)
 

Detailed Description

Interface with public methods needed to be implemented in a salting hashing class.

Definition at line 24 of file PasswordHashInterface.php.

Member Function Documentation

◆ checkPassword()

bool TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashInterface::checkPassword ( string  $plainPW,
string  $saltedHashPW 
)

Method checks if a given plaintext password is correct by comparing it with a given salted hashed password.

Parameters
string$plainPW‪plain-text password to compare with salted hash
string$saltedHashPW‪Salted hash to compare plain-text password with
Returns
‪bool TRUE, if plaintext password is correct, otherwise FALSE

Implemented in TYPO3\CMS\Core\Crypto\PasswordHashing\AbstractArgon2PasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\BcryptPasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\PhpassPasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\BlowfishPasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\Pbkdf2PasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\Md5PasswordHash, and TYPO3\CMS\Core\Tests\Unit\Authentication\Mfa\Provider\Fixtures\Crypto\PasswordHashing\NoopPasswordHash.

◆ getHashedPassword()

string null TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashInterface::getHashedPassword ( string  $password)

◆ isAvailable()

◆ isHashUpdateNeeded()

bool TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashInterface::isHashUpdateNeeded ( string  $passString)

Checks whether a user's hashed password needs to be replaced with a new hash.

This is typically called during the login process when the plain text password is available. A new hash is needed when the desired iteration count has changed through a change in the variable $hashCount or HASH_COUNT.

Parameters
string$passString‪Salted hash to check if it needs an update
Returns
‪bool TRUE if salted hash needs an update, otherwise FALSE

Implemented in TYPO3\CMS\Core\Crypto\PasswordHashing\BlowfishPasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\Pbkdf2PasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\AbstractArgon2PasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\BcryptPasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\PhpassPasswordHash, TYPO3\CMS\Core\Crypto\PasswordHashing\Md5PasswordHash, and TYPO3\CMS\Core\Tests\Unit\Authentication\Mfa\Provider\Fixtures\Crypto\PasswordHashing\NoopPasswordHash.

◆ isValidSaltedPW()

bool TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashInterface::isValidSaltedPW ( string  $saltedPW)