PHP 클래스 Webiny\Component\Security\Encoder\Encoder

This class loads the defined encoder and uses it to create a hash from the submitted password and verifies if it matches the password from the user provider.
상속: use trait Webiny\Component\StdLib\StdLibTrait, use trait Webiny\Component\StdLib\FactoryLoaderTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $driver, array | null $params = null )
createPasswordHash ( string $password ) : string Create a hash for the given password.
verifyPasswordHash ( string $password, string $hash ) : boolean Verify if the $password matches the $hash.

메소드 상세

__construct() 공개 메소드

public __construct ( string $driver, array | null $params = null )
$driver string Name of the encoder provider class.
$params array | null Optional encoder params.

createPasswordHash() 공개 메소드

Create a hash for the given password.
public createPasswordHash ( string $password ) : string
$password string
리턴 string Password hash.

verifyPasswordHash() 공개 메소드

Verify if the $password matches the $hash.
public verifyPasswordHash ( string $password, string $hash ) : boolean
$password string
$hash string
리턴 boolean True if $password matches $hash. Otherwise false is returned.