PHP 클래스 Defuse\Crypto\KeyOrPassword

파일 보기 프로젝트 열기: defuse/php-encryption 1 사용 예제들

공개 메소드들

메소드 설명
createFromKey ( Defuse\Crypto\Key $key ) : KeyOrPassword Initializes an instance of KeyOrPassword from a key.
createFromPassword ( string $password ) : KeyOrPassword Initializes an instance of KeyOrPassword from a password.
deriveKeys ( string $salt ) : Defuse\Crypto\DerivedKeys Derives authentication and encryption keys from the secret, using a slow key derivation function if the secret is a password.

비공개 메소드들

메소드 설명
__construct ( integer $secret_type, mixed $secret ) Constructor for KeyOrPassword.

메소드 상세

createFromKey() 공개 정적인 메소드

Initializes an instance of KeyOrPassword from a key.
public static createFromKey ( Defuse\Crypto\Key $key ) : KeyOrPassword
$key Defuse\Crypto\Key
리턴 KeyOrPassword

createFromPassword() 공개 정적인 메소드

Initializes an instance of KeyOrPassword from a password.
public static createFromPassword ( string $password ) : KeyOrPassword
$password string
리턴 KeyOrPassword

deriveKeys() 공개 메소드

Derives authentication and encryption keys from the secret, using a slow key derivation function if the secret is a password.
public deriveKeys ( string $salt ) : Defuse\Crypto\DerivedKeys
$salt string
리턴 Defuse\Crypto\DerivedKeys