PHP 클래스 Corcel\Password\PasswordService

파일 보기 프로젝트 열기: jgrossi/corcel 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( )
check ( string $password, string $hash, string | integer $user_id = '' ) : boolean Checks the plaintext password against the encrypted Password.
makeHash ( string $password ) : string Create a hash (encrypt) of a plain text password.

메소드 상세

__construct() 공개 메소드

public __construct ( )

check() 공개 메소드

Maintains compatibility between old version and the new cookie authentication protocol using PHPass library. The $hash parameter is the encrypted password and the function compares the plain text password when encrypted similarly against the already encrypted password to see if they match. For integration with other applications, this function can be overwritten to instead use the other package password checking algorithm.
부터: 2.5.0
public check ( string $password, string $hash, string | integer $user_id = '' ) : boolean
$password string Plaintext user's password
$hash string Hash of the user's password to check against.
$user_id string | integer Optional. User ID.
리턴 boolean False, if the $password does not match the hashed password

makeHash() 공개 메소드

For integration with other applications, this function can be overwritten to instead use the other package password checking algorithm.
부터: 2.5.0
public makeHash ( string $password ) : string
$password string Plain text user password to hash
리턴 string The hash string of the password