TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt Class Reference
Inheritance diagram for TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt:
TYPO3\CMS\Saltedpasswords\Salt\Md5Salt TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt TYPO3\CMS\Saltedpasswords\Salt\BlowfishSalt

Public Member Functions

 base64Encode ($input, $count)
 

Protected Member Functions

 applySettingsToSalt ($salt)
 
 getGeneratedSalt ()
 
 getItoa64 ()
 
 getSetting ()
 
 getLengthBase64FromBytes ($byteLength)
 

Detailed Description

Abstract class with methods needed to be extended in a salted hashing class.

Definition at line 21 of file AbstractSalt.php.

Member Function Documentation

◆ applySettingsToSalt()

TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt::applySettingsToSalt (   $salt)
abstractprotected

Method applies settings (prefix, optional hash count, optional suffix) to a salt.

Parameters
string$saltA salt to apply setting to
Returns
string Salt with setting

◆ base64Encode()

TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt::base64Encode (   $input,
  $count 
)

Encodes bytes into printable base 64 using the *nix standard from crypt().

Parameters
string$inputThe string containing bytes to encode.
int$countThe number of characters (bytes) to encode.
Returns
string Encoded string

Definition at line 60 of file AbstractSalt.php.

References TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt\getItoa64().

Referenced by TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt\cryptPassword(), TYPO3\CMS\Saltedpasswords\Salt\Md5Salt\getGeneratedSalt(), and TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt\getGeneratedSalt().

◆ getGeneratedSalt()

TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt::getGeneratedSalt ( )
abstractprotected

Generates a random base salt settings for the hash.

Returns
string A string containing settings and a random salt

◆ getItoa64()

TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt::getItoa64 ( )
abstractprotected

Returns a string for mapping an int to the corresponding base 64 character.

Returns
string String for mapping an int to the corresponding base 64 character

Referenced by TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt\base64Encode().

◆ getLengthBase64FromBytes()

TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt::getLengthBase64FromBytes (   $byteLength)
protected

◆ getSetting()

TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt::getSetting ( )
abstractprotected

Returns setting string to indicate type of hashing method.

Returns
string Setting string of hashing method