PHP Class Nette\Security\Passwords

Inheritance: use trait Nette\StaticClass
Afficher le fichier Open project: nette/security Class Usage Examples

Méthodes publiques

Méthode Description
hash ( $password, array $options = [] ) : string Computes salted password hash.
needsRehash ( $hash, array $options = [] ) : boolean Checks if the given hash matches the options.
verify ( $password, $hash ) : boolean Verifies that a password matches a hash.

Method Details

hash() public static méthode

Computes salted password hash.
public static hash ( $password, array $options = [] ) : string
$options array
Résultat string 60 chars long

needsRehash() public static méthode

Checks if the given hash matches the options.
public static needsRehash ( $hash, array $options = [] ) : boolean
$options array
Résultat boolean

verify() public static méthode

Verifies that a password matches a hash.
public static verify ( $password, $hash ) : boolean
Résultat boolean