PHP 클래스 Gdn_PasswordHash, vanilla

상속: extends PasswordHash
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$Weak boolean
$portable_hashes boolean

보호된 프로퍼티들

프로퍼티 타입 설명
$algorithms array

공개 메소드들

메소드 설명
checkPassword ( string $Password, string $StoredHash, boolean | string $Method = false ) : boolean Check a password against a stored password.
hashPassword ( string $password ) : string Create a password hash.
hashPasswordPhpass ( string $password ) : string Create a password hash using Phpass's algorithm.

보호된 메소드들

메소드 설명
checkYAF ( string $Password, string $StoredHash ) : boolean Check a YAF hash.
getAlgorithm ( string $algorithm ) : object Grab an instance of a valid password algorithm.

메소드 상세

checkPassword() 공개 메소드

The stored password can be plain, a md5 hash or a phpass hash. If the password wasn't a phppass hash, the Weak property is set to **true**.
public checkPassword ( string $Password, string $StoredHash, boolean | string $Method = false ) : boolean
$Password string The plaintext password to check.
$StoredHash string The password hash stored in the database.
$Method boolean | string The password hashing method.
리턴 boolean Returns **true** if the password matches the hash or **false** if it doesn't.

checkYAF() 보호된 메소드

Check a YAF hash.
protected checkYAF ( string $Password, string $StoredHash ) : boolean
$Password string The plaintext password to check.
$StoredHash string The password hash stored in the database.
리턴 boolean Returns **true** if the password matches the hash or **false** if it doesn't.

getAlgorithm() 보호된 메소드

Grab an instance of a valid password algorithm.
protected getAlgorithm ( string $algorithm ) : object
$algorithm string
리턴 object

hashPassword() 공개 메소드

This method tries to use PHP's built in {@link password_hash()} function and falls back to the default implementation if that's not possible.
public hashPassword ( string $password ) : string
$password string The plaintext password to hash.
리턴 string Returns a secure hash of {@link $password}.

hashPasswordPhpass() 공개 메소드

Create a password hash using Phpass's algorithm.
public hashPasswordPhpass ( string $password ) : string
$password string The plaintext password to hash.
리턴 string Returns a password hash.

프로퍼티 상세

$Weak 공개적으로 프로퍼티

public bool $Weak
리턴 boolean

$algorithms 보호되어 있는 프로퍼티

protected array $algorithms
리턴 array

$portable_hashes 공개적으로 프로퍼티

public bool $portable_hashes
리턴 boolean