BcryptHasher
class BcryptHasher extends AbstractHasher implements Hasher (View source)
Properties
protected int | $rounds | The default cost factor. |
|
protected bool | $verifyAlgorithm | Indicates whether to perform an algorithm check. |
Methods
bool
check(string $value, string|null $hashedValue, array $options = [])
Check the given plain value against a hash.
void
__construct(array $options = [])
Create a new hasher instance.
string
make(string $value, array $options = [])
Hash the given value.
bool
needsRehash(string $hashedValue, array $options = [])
Check if the given hash has been hashed using the given options.
$this
setRounds(int $rounds)
Set the default password work factor.
int
cost(array $options = [])
Extract the cost value from the options array.
Details
array
info(string $hashedValue)
Get information about the given hashed value.
bool
check(string $value, string|null $hashedValue, array $options = [])
Check the given plain value against a hash.
void
__construct(array $options = [])
Create a new hasher instance.
string
make(string $value, array $options = [])
Hash the given value.
bool
needsRehash(string $hashedValue, array $options = [])
Check if the given hash has been hashed using the given options.
$this
setRounds(int $rounds)
Set the default password work factor.
protected int
cost(array $options = [])
Extract the cost value from the options array.