Documentation

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
since
1.0.0

$verifyAlgorithm

Determine whether to perform an algorithm check.

private bool $verifyAlgorithm = false
Tags
since
1.0.0

Methods

__construct()

__construct.

public __construct(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>
Tags
since
1.0.0
Return values
mixed

getCost()

Get the cost value.

public getCost() : int
Tags
since
1.0.0
Return values
int

info()

Get information about the given hash.

public info((string) $hash) : array<string|int, mixed>
Parameters
$hash : (string)
Tags
since
1.0.0
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
since
1.0.0
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
since
1.0.0
Return values
bool

setCost()

Set the cost.

public setCost(int $cost) : object
Parameters
$cost : int
Tags
since
1.0.0
Return values
object

verify()

Verify the hash value.

public verify(string $original, string $hash) : bool
Parameters
$original : string
$hash : string
Tags
since
1.0.0
Return values
bool

algorithm()

Get the algroithm.

protected algorithm() : Constant
Tags
since
1.0.0
Return values
Constant

Search results