PHP 클래스 Bcrypt

파일 보기 프로젝트 열기: bcosca/fatfree-core 1 사용 예제들

공개 메소드들

메소드 설명
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