BcryptHasher

class BcryptHasher implements HasherInterface (View source)

Properties

protected int $rounds Default crypt cost factor.

Methods

string make(string $value, array $options = array())

Hash the given value.

bool check(string $value, string $hashedValue, array $options = array())

Check the given plain value against a hash.

bool needsRehash(string $hashedValue, array $options = array())

Check if the given hash has been hashed using the given options.

void setRounds(int $rounds)

Set the default crypt cost factor.

Details

string make(string $value, array $options = array())

Hash the given value.

Parameters

string $value
array $options

Return Value

string

Exceptions

RuntimeException

bool check(string $value, string $hashedValue, array $options = array())

Check the given plain value against a hash.

Parameters

string $value
string $hashedValue
array $options

Return Value

bool

bool needsRehash(string $hashedValue, array $options = array())

Check if the given hash has been hashed using the given options.

Parameters

string $hashedValue
array $options

Return Value

bool

void setRounds(int $rounds)

Set the default crypt cost factor.

Parameters

int $rounds

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Hashing/BcryptHasher.html