PHP Class Bcrypt

Afficher le fichier Open project: bcosca/fatfree-core Class Usage Examples

Méthodes publiques

Méthode Description
hash ( $pw, $salt = NULL, $cost = self::COST ) : string | FALSE Generate bcrypt hash of string
needs_rehash ( $hash, $cost = self::COST ) : boolean Check if password is still strong enough
verify ( $pw, $hash ) : boolean Verify password against hash using timing attack resistant approach

Method Details

hash() public méthode

Generate bcrypt hash of string
public hash ( $pw, $salt = NULL, $cost = self::COST ) : string | FALSE
$pw string
$salt string
$cost int
Résultat string | FALSE

needs_rehash() public méthode

Check if password is still strong enough
public needs_rehash ( $hash, $cost = self::COST ) : boolean
$hash string
$cost int
Résultat boolean

verify() public méthode

Verify password against hash using timing attack resistant approach
public verify ( $pw, $hash ) : boolean
$pw string
$hash string
Résultat boolean