PHP 클래스 ParagonIE\Halite\Password

상속: implements ParagonIE\Halite\Contract\PasswordInterface
파일 보기 프로젝트 열기: paragonie/halite 1 사용 예제들

공개 메소드들

메소드 설명
hash ( HiddenString $password, EncryptionKey $secretKey, string $level = KeyFactory::INTERACTIVE ) : string Hash then encrypt a password
needsRehash ( string $stored, EncryptionKey $secretKey, string $level = KeyFactory::INTERACTIVE ) : boolean Is this password hash stale?
verify ( HiddenString $password, string $stored, EncryptionKey $secretKey ) : boolean Decrypt then verify a password

보호된 메소드들

메소드 설명
getConfig ( string $stored ) : SymmetricConfig Get the configuration for this version of halite

메소드 상세

getConfig() 보호된 정적인 메소드

Get the configuration for this version of halite
protected static getConfig ( string $stored ) : SymmetricConfig
$stored string A stored password hash
리턴 SymmetricConfig

hash() 공개 정적인 메소드

Hash then encrypt a password
public static hash ( HiddenString $password, EncryptionKey $secretKey, string $level = KeyFactory::INTERACTIVE ) : string
$password HiddenString The user's password
$secretKey EncryptionKey The master key for all passwords
$level string The security level for this password
리턴 string An encrypted hash to store

needsRehash() 공개 정적인 메소드

Is this password hash stale?
public static needsRehash ( string $stored, EncryptionKey $secretKey, string $level = KeyFactory::INTERACTIVE ) : boolean
$stored string Encrypted password hash
$secretKey EncryptionKey The master key for all passwords
$level string The security level for this password
리턴 boolean Do we need to regenerate the hash or ciphertext?

verify() 공개 정적인 메소드

Decrypt then verify a password
public static verify ( HiddenString $password, string $stored, EncryptionKey $secretKey ) : boolean
$password HiddenString The user's password
$stored string The encrypted password hash
$secretKey EncryptionKey The master key for all passwords
리턴 boolean Is this password valid?