PHP 인터페이스 JeremyKendall\Password\PasswordValidatorInterface

파일 보기 프로젝트 열기: jeremykendall/password-validator 0 사용 예제들

공개 메소드들

메소드 설명
getOptions ( ) : array Gets options for password_hash function
isValid ( string $password, string $passwordHash, string $legacySalt = null, string $identity = null ) : JeremyKendall\Password\Result Validates password and rehashes if necessary.
rehash ( string $password ) : string Hashes password using password_hash. Uses PASSWORD_DEFAULT encryption.
setOptions ( array $options ) Set options for password_hash function

메소드 상세

getOptions() 공개 메소드

Gets options for password_hash function
public getOptions ( ) : array
리턴 array password_hash options

isValid() 공개 메소드

Validates password and rehashes if necessary.
public isValid ( string $password, string $passwordHash, string $legacySalt = null, string $identity = null ) : JeremyKendall\Password\Result
$password string Password provided by user during login
$passwordHash string User's current hashed password
$legacySalt string OPTIONAL salt used in legacy password hashing
$identity string OPTIONAL unique user identifier
리턴 JeremyKendall\Password\Result

rehash() 공개 메소드

Hashes password using password_hash. Uses PASSWORD_DEFAULT encryption.
public rehash ( string $password ) : string
$password string Plain text password
리턴 string Hashed password

setOptions() 공개 메소드

Set options for password_hash function
또한 보기: http://php.net/password_hash Please, don't create your own salt. Really, just don't. Review the documentation first if you feel you just gotta create your own salt.
public setOptions ( array $options )
$options array password_hash options