TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
SaltInterface Interface Reference
Inheritance diagram for SaltInterface:
Md5Salt Pbkdf2Salt PhpassSalt BlowfishSalt

Public Member Functions

 checkPassword ($plainPW, $saltedHashPW)
 
 getSaltLength ()
 
 isAvailable ()
 
 getHashedPassword ($password, $salt=null)
 
 isHashUpdateNeeded ($passString)
 
 isValidSalt ($salt)
 
 isValidSaltedPW ($saltedPW)
 

Detailed Description

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

Definition at line 21 of file SaltInterface.php.

Member Function Documentation

checkPassword (   $plainPW,
  $saltedHashPW 
)

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

Parameters
string$plainPWplain-text password to compare with salted hash
string$saltedHashPWSalted hash to compare plain-text password with
Returns
bool TRUE, if plaintext password is correct, otherwise FALSE

Implemented in PhpassSalt, Pbkdf2Salt, and Md5Salt.

getHashedPassword (   $password,
  $salt = null 
)

Method creates a salted hash for a given plaintext password

Parameters
string$passwordPlaintext password to create a salted hash from
string$saltOptional custom salt to use
Returns
string Salted hashed password

Implemented in PhpassSalt, Pbkdf2Salt, and Md5Salt.

getSaltLength ( )

Returns length of required salt.

Returns
int Length of required salt

Implemented in PhpassSalt, Pbkdf2Salt, BlowfishSalt, and Md5Salt.

isAvailable ( )

Returns whether all prequesites for the hashing methods are matched

Returns
bool Method available

Implemented in Pbkdf2Salt, BlowfishSalt, Md5Salt, and PhpassSalt.

isHashUpdateNeeded (   $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 or if the user's password hash was generated in an bulk update with class ext_update.

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

Implemented in PhpassSalt, Pbkdf2Salt, BlowfishSalt, and Md5Salt.

isValidSalt (   $salt)

Method determines if a given string is a valid salt

Parameters
string$saltString to check
Returns
bool TRUE if it's valid salt, otherwise FALSE

Implemented in PhpassSalt, Pbkdf2Salt, BlowfishSalt, and Md5Salt.

isValidSaltedPW (   $saltedPW)

Method determines if a given string is a valid salted hashed password.

Parameters
string$saltedPWString to check
Returns
bool TRUE if it's valid salted hashed password, otherwise FALSE

Implemented in PhpassSalt, Pbkdf2Salt, BlowfishSalt, and Md5Salt.