‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory Class Reference

Public Member Functions

PasswordHashInterface get (string $hash, string $mode)
 
PasswordHashInterface getDefaultHashInstance (string $mode)
 

Static Public Member Functions

static getRegisteredSaltedHashingMethods ()
 

Detailed Description

Factory class to find and return hash instances of given hashed passwords and to find and return default hash instances to hash new passwords.

Definition at line 26 of file PasswordHashFactory.php.

Member Function Documentation

◆ get()

PasswordHashInterface TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory::get ( string  $hash,
string  $mode 
)

Find a hash class that handles given hash and return an instance of it.

Parameters
string$hash‪Given hash to find instance for
string$mode‪'FE' for frontend users, 'BE' for backend users
Returns
PasswordHashInterface Object that can handle given hash
Exceptions

Definition at line 38 of file PasswordHashFactory.php.

References $GLOBALS.

◆ getDefaultHashInstance()

PasswordHashInterface TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory::getDefaultHashInstance ( string  $mode)

Determine configured default hash method and return an instance of the class representing it.

Parameters
string$mode‪'FE' for frontend users, 'BE' for backend users
Returns
PasswordHashInterface Class instance that is configured as default hash method
Exceptions

Definition at line 88 of file PasswordHashFactory.php.

References $GLOBALS.

◆ getRegisteredSaltedHashingMethods()

static TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory::getRegisteredSaltedHashingMethods ( )
static