BcryptHashing extends AbstractHashing
Table of Contents
- $cost : int
- The default cost.
- $verifyAlgorithm : bool
- Determine whether to perform an algorithm check.
- __construct() : mixed
- __construct.
- getCost() : int
- Get the cost value.
- info() : array<string|int, mixed>
- Get information about the given hash.
- make() : string
- Generate the hash.
- needsRehash() : bool
- Check if the given hash has been hashed using the given options.
- setCost() : object
- Set the cost.
- verify() : bool
- Verify the hash value.
- algorithm() : Constant
- Get the algroithm.
Properties
$cost
The default cost.
private
int
$cost
= 10
Tags
$verifyAlgorithm
Determine whether to perform an algorithm check.
private
bool
$verifyAlgorithm
= false
Tags
Methods
__construct()
__construct.
public
__construct(array<string|int, mixed> $options) : mixed
Parameters
- $options : array<string|int, mixed>
Tags
Return values
mixed —getCost()
Get the cost value.
public
getCost() : int
Tags
Return values
int —info()
Get information about the given hash.
public
info((string) $hash) : array<string|int, mixed>
Parameters
- $hash : (string)
Tags
Return values
array<string|int, mixed> —make()
Generate the hash.
public
make(string $original[, array<string|int, mixed> $options = null ]) : string
Parameters
- $original : string
- $options : array<string|int, mixed> = null
Tags
Return values
string —needsRehash()
Check if the given hash has been hashed using the given options.
public
needsRehash(mixed $hash[, array<string|int, mixed> $options = null ]) : bool
Parameters
- $hash : mixed
- $options : array<string|int, mixed> = null
Tags
Return values
bool —setCost()
Set the cost.
public
setCost(int $cost) : object
Parameters
- $cost : int
Tags
Return values
object —verify()
Verify the hash value.
public
verify(string $original, string $hash) : bool
Parameters
- $original : string
- $hash : string
Tags
Return values
bool —algorithm()
Get the algroithm.
protected
algorithm() : Constant