TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Saltedpasswords\Salt\SaltInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Saltedpasswords\Salt\SaltInterface:
tx_saltedpasswords_salts TYPO3\CMS\Saltedpasswords\Salt\Md5Salt TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt tx_saltedpasswords_salts_md5 TYPO3\CMS\Saltedpasswords\Salt\BlowfishSalt tx_saltedpasswords_salts_phpass tx_saltedpasswords_salts_blowfish

Public Member Functions

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

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Interface with public methods needed to be implemented in a salting hashing class.

Author
Marcus Krause <marcus::exp2009.info>
Steffen Ritter info@.nosp@m.rs-w.nosp@m.ebsys.nosp@m.tems.nosp@m..de

Definition at line 24 of file SaltInterface.php.

Member Function Documentation

◆ checkPassword()

TYPO3\CMS\Saltedpasswords\Salt\SaltInterface::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
boolean TRUE, if plaintext password is correct, otherwise FALSE

Implemented in TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt, and TYPO3\CMS\Saltedpasswords\Salt\Md5Salt.

◆ getHashedPassword()

TYPO3\CMS\Saltedpasswords\Salt\SaltInterface::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 TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt, and TYPO3\CMS\Saltedpasswords\Salt\Md5Salt.

◆ getSaltLength()

TYPO3\CMS\Saltedpasswords\Salt\SaltInterface::getSaltLength ( )

Returns length of required salt.

Returns
integer Length of required salt

Implemented in TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt, TYPO3\CMS\Saltedpasswords\Salt\BlowfishSalt, and TYPO3\CMS\Saltedpasswords\Salt\Md5Salt.

◆ isAvailable()

TYPO3\CMS\Saltedpasswords\Salt\SaltInterface::isAvailable ( )

Returns whether all prequesites for the hashing methods are matched

Returns
boolean Method available

Implemented in TYPO3\CMS\Saltedpasswords\Salt\BlowfishSalt, TYPO3\CMS\Saltedpasswords\Salt\Md5Salt, and TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt.

◆ isHashUpdateNeeded()

TYPO3\CMS\Saltedpasswords\Salt\SaltInterface::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
boolean TRUE if salted hash needs an update, otherwise FALSE

Implemented in TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt, TYPO3\CMS\Saltedpasswords\Salt\BlowfishSalt, and TYPO3\CMS\Saltedpasswords\Salt\Md5Salt.

◆ isValidSalt()

TYPO3\CMS\Saltedpasswords\Salt\SaltInterface::isValidSalt (   $salt)

Method determines if a given string is a valid salt

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

Implemented in TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt, TYPO3\CMS\Saltedpasswords\Salt\BlowfishSalt, and TYPO3\CMS\Saltedpasswords\Salt\Md5Salt.

◆ isValidSaltedPW()

TYPO3\CMS\Saltedpasswords\Salt\SaltInterface::isValidSaltedPW (   $saltedPW)

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

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

Implemented in TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt, TYPO3\CMS\Saltedpasswords\Salt\BlowfishSalt, and TYPO3\CMS\Saltedpasswords\Salt\Md5Salt.