[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch




/vendor/ircmaxell/password-compat/lib/ -> password.php (summary)

A Compatibility library with PHP 5.5's simplified password hashing API.

Author: Anthony Ferrara <ircmaxell@php.net>
Copyright: 2012 The Authors
License: http://www.opensource.org/licenses/mit-license.html MIT License
File Size: 314 lines (12 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions


Functions that are not part of a class:

password_hash($password, $algo, array $options = array()   X-Ref
Hash the password using the specified algorithm

param: string $password The password to hash
param: int    $algo     The algorithm to use (Defined by PASSWORD_* constants)
param: array  $options  The options for the algorithm to use
return: string|false The hashed password, or false on error.

password_get_info($hash)   X-Ref
Get information about the password hash. Returns an array of the information
that was used to generate the password hash.

'algo' => 1,
'algoName' => 'bcrypt',
'options' => array(

param: string $hash The password hash to extract info from
return: array The array of information about the hash.

password_needs_rehash($hash, $algo, array $options = array()   X-Ref
Determine if the password hash needs to be rehashed according to the options provided

If the answer is true, after validating the password using password_verify, rehash it.

param: string $hash    The hash to test
param: int    $algo    The algorithm used for new password hashes
param: array  $options The options array passed to password_hash
return: boolean True if the password needs to be rehashed.

password_verify($password, $hash)   X-Ref
Verify a password against a hash using a timing attack resistant approach

param: string $password The password to verify
param: string $hash     The hash to verify against
return: boolean If the password matches the hash

_strlen($binary_string)   X-Ref
Count the number of bytes in a string

We cannot simply use strlen() for this, because it might be overwritten by the mbstring extension.
In this case, strlen() will count the number of *characters* based on the internal encoding. A
sequence of bytes might be regarded as a single multibyte character.

param: string $binary_string The input string
return: int The number of bytes

_substr($binary_string, $start, $length)   X-Ref
Get a substring based on byte limits

param: string $binary_string The input string
param: int    $start
param: int    $length
return: string The substring

check()   X-Ref
Check if current PHP version is compatible with the library

return: boolean the check result

Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1