class
Illuminate
/
Hashing
/
BcryptHasher
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
BcryptHasher
Extends
Implements
Properties
protected
$rounds int
The default cost factor.
Default: 10
protected
$verifyAlgorithm bool
Indicates whether to perform an algorithm check.
Default: false
Methods
public
__construct ( array $options ) : void
Create a new hasher instance.
Parameters
- $options array
public
make ( $value , array $options ) : string
Hash the given value.
Parameters
- $value string
- $options array
public
check ( $value , $hashedValue , array $options ) : bool
Check the given plain value against a hash.
Parameters
- $value string
- $hashedValue string
- $options array
public
needsRehash ( $hashedValue , array $options ) : bool
Check if the given hash has been hashed using the given options.
Parameters
- $hashedValue string
- $options array
public
setRounds ( $rounds ) : $this
Set the default password work factor.
Parameters
- $rounds int
protected
cost ( array $options ) : int
Extract the cost value from the options array.
Parameters
- $options array