PHP 클래스 Horde_Crypt_Blowfish, horde

저자: Matthew Fonda ([email protected])
저자: Michael Slusarz ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_crypt Horde_Crypt_Blowfish_Base Blowfish crypt driver.

공개 메소드들

메소드 설명
__construct ( string $key, array $opts = [] ) Constructor.
__get ( $name )
decrypt ( string $text ) : string Decrypts a string.
encrypt ( string $text ) : string Encrypts a string.
setKey ( string $key, string $iv = null ) Sets the secret key.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $key, array $opts = [] )
$key string Encryption key.
$opts array Additional options: - cipher: (string) Either 'ecb' or 'cbc'. - ignore: (integer) A mask of drivers to ignore (IGNORE_* constants). - iv: (string) IV to use.

__get() 공개 메소드

public __get ( $name )

decrypt() 공개 메소드

Decrypts a string.
public decrypt ( string $text ) : string
$text string The string to decrypt.
리턴 string The plaintext.

encrypt() 공개 메소드

Encrypts a string.
public encrypt ( string $text ) : string
$text string The string to encrypt.
리턴 string The ciphertext.

setKey() 공개 메소드

The key must be non-zero, and less than or equal to MAXKEYSIZE characters (bytes) in length.
public setKey ( string $key, string $iv = null )
$key string Key must be non-empty and less than MAXKEYSIZE bytes in length.
$iv string The initialization vector to use. Only needed for 'cbc' cipher. If null, an IV is automatically generated.

프로퍼티 상세

$_crypt 보호되어 있는 프로퍼티

Blowfish crypt driver.
protected Horde_Crypt_Blowfish_Base $_crypt
리턴 Horde_Crypt_Blowfish_Base