PHP Класс Bcrypt

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

hash() публичный метод

Generate bcrypt hash of string
public hash ( $pw, $salt = NULL, $cost = self::COST ) : string | FALSE
$pw string
$salt string
$cost int
Результат string | FALSE

needs_rehash() публичный метод

Check if password is still strong enough
public needs_rehash ( $hash, $cost = self::COST ) : boolean
$hash string
$cost int
Результат boolean

verify() публичный метод

Verify password against hash using timing attack resistant approach
public verify ( $pw, $hash ) : boolean
$pw string
$hash string
Результат boolean