ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Static Public Member Functions | |
static | hashPassword (string $password, string $algorithm='', string $salt='', int $spinCount=10000) |
Create a password hash from a given string by a specific algorithm. More... | |
Static Private Member Functions | |
static | getAlgorithm (string $algorithmName) |
Get algorithm name for PHP. More... | |
static | defaultHashPassword (string $pPassword) |
Create a password hash from a given string. More... | |
Definition at line 8 of file PasswordHasher.php.
|
staticprivate |
Create a password hash from a given string.
This method is based on the algorithm provided by Daniel Rentz of OpenOffice and the PEAR package Spreadsheet_Excel_Writer by Xavier Noguer xnogu. er@r ezebr a.co m
string | $pPassword | Password to hash |
Definition at line 49 of file PasswordHasher.php.
References $password.
|
staticprivate |
Get algorithm name for PHP.
Definition at line 13 of file PasswordHasher.php.
References PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_MD2, PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_MD4, PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_MD5, PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_RIPEMD_128, PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_RIPEMD_160, PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_SHA_1, PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_SHA_256, PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_SHA_384, PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_SHA_512, and PhpOffice\PhpSpreadsheet\Worksheet\Protection\ALGORITHM_WHIRLPOOL.
|
static |
Create a password hash from a given string by a specific algorithm.
2.4.2.4 ISO Write Protection Method
string | $password | Password to hash |
string | $algorithm | Hash algorithm used to compute the password hash value |
string | $salt | Pseudorandom string |
int | $spinCount | Number of times to iterate on a hash of a password |
Definition at line 83 of file PasswordHasher.php.
References $i, and GuzzleHttp\Psr7\hash().
Referenced by PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\protectCells(), PhpOffice\PhpSpreadsheet\Worksheet\Protection\setPassword(), PhpOffice\PhpSpreadsheet\Document\Security\setRevisionsPassword(), PhpOffice\PhpSpreadsheet\Document\Security\setWorkbookPassword(), and PhpOffice\PhpSpreadsheet\Worksheet\Protection\verify().