PHP Class Hash, someline-starter

Afficher le fichier Open project: someline/someline-starter Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

make() public static méthode

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

needsRehash() public static méthode

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

setRounds() public static méthode

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