PHP Класс Horde_Crypt_Blowfish_Base, horde

Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$cipher string Cipher method.
$iv string Initialization vector.
$key string Encryption key.

Открытые методы

Метод Описание
__construct ( string $cipher ) Constructor.
decrypt ( string $text ) : string Decrypts a string.
encrypt ( string $text ) : string Encrypts a string.
setIv ( string $iv = null ) Sets the initialization vector (required for CBC mode).
supported ( ) : boolean Is this driver supported on this system?

Защищенные методы

Метод Описание
_pad ( string $text, boolean $ignore = false ) : string Pad text to match blocksize length.
_unpad ( string $text ) : string Unpad text from blocksize boundary.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( string $cipher )
$cipher string Either 'ecb' or 'cbc'.

_pad() защищенный Метод

Pad text to match blocksize length.
protected _pad ( string $text, boolean $ignore = false ) : string
$text string Unpadded text.
$ignore boolean Don't pad if already at blocksize length.
Результат string Padded text.

_unpad() защищенный Метод

Unpad text from blocksize boundary.
protected _unpad ( string $text ) : string
$text string Padded text.
Результат string Unpadded text.

decrypt() абстрактный публичный Метод

Decrypts a string.
abstract public decrypt ( string $text ) : string
$text string The string to encrypt.
Результат string The ciphertext.

encrypt() абстрактный публичный Метод

Encrypts a string.
abstract public encrypt ( string $text ) : string
$text string The string to encrypt.
Результат string The ciphertext.

setIv() публичный Метод

Sets the initialization vector (required for CBC mode).
public setIv ( string $iv = null )
$iv string Initialization vector.

supported() публичный статический Метод

Is this driver supported on this system?
public static supported ( ) : boolean
Результат boolean True if supported.

Описание свойств

$cipher публичное свойство

Cipher method.
public string $cipher
Результат string

$iv публичное свойство

Initialization vector.
public string $iv
Результат string

$key публичное свойство

Encryption key.
public string $key
Результат string