\PhpOffice\PhpSpreadsheet\SharedPasswordHasher

Summary

Methods
Properties
Constants
hashPassword()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getAlgorithm()
defaultHashPassword()
No private properties found
N/A

Methods

hashPassword()

hashPassword(string  $password, string  $algorithm = '', string  $salt = '', integer  $spinCount = 10000) : string

Create a password hash from a given string by a specific algorithm.

2.4.2.4 ISO Write Protection Method

Parameters

string $password

Password to hash

string $algorithm

Hash algorithm used to compute the password hash value

string $salt

Pseudorandom string

integer $spinCount

Number of times to iterate on a hash of a password

Returns

string —

Hashed password

getAlgorithm()

getAlgorithm(\PhpOffice\PhpSpreadsheet\Shared\string  $algorithmName) 

Get algorithm name for PHP.

Parameters

\PhpOffice\PhpSpreadsheet\Shared\string $algorithmName

defaultHashPassword()

defaultHashPassword(string  $pPassword) 

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 xnoguer@rezebra.com.

Parameters

string $pPassword

Password to hash