TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt Class Reference
Inheritance diagram for TYPO3\CMS\Saltedpasswords\Salt\AbstractSalt:
tx_saltedpasswords_abstract_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

 base64Encode ($input, $count)
 

Protected Member Functions

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

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! Abstract class with methods needed to be extended in a salted hashing class.

Author
Marcus Krause <marcus::exp2009.info>

Definition at line 23 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.
integer$countThe number of characters (bytes) to encode.
Returns
string Encoded string

Definition at line 62 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