PHP Class Hash, someline-starter

Exibir arquivo Open project: someline/someline-starter Class Usage Examples

Public Methods

Method Description
check ( string $value, string $hashedValue, array $options = [] ) : boolean Check the given plain value against a hash.
make ( string $value, array $options = [] ) : string Hash the given value.
needsRehash ( string $hashedValue, array $options = [] ) : boolean Check if the given hash has been hashed using the given options.
setRounds ( integer $rounds ) Set the default password work factor.

Method Details

check() public static method

Check the given plain value against a hash.
public static check ( string $value, string $hashedValue, array $options = [] ) : boolean
$value string
$hashedValue string
$options array
return boolean

make() public static method

Hash the given value.
public static make ( string $value, array $options = [] ) : string
$value string
$options array
return string

needsRehash() public static method

Check if the given hash has been hashed using the given options.
public static needsRehash ( string $hashedValue, array $options = [] ) : boolean
$hashedValue string
$options array
return boolean

setRounds() public static method

Set the default password work factor.
public static setRounds ( integer $rounds )
$rounds integer