Documentation

Horde_Crypt_Blowfish_Php extends Horde_Crypt_Blowfish_Base
in package

Native PHP driver for blowfish encryption.

Tags
author

Matthew Fonda mfonda@php.net

author

Philippe Jausions jausions@php.net

author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2005-2008 Matthew Fonda

copyright

2008 Philippe Jausions

copyright

2012-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$cipher  : string
Cipher method.
$iv  : string
Initialization vector.
$key  : string
Encryption key.
$_ob  : Horde_Crypt_Blowfish_Php_Base
Subclass object.
__construct()  : mixed
Constructor.
decrypt()  : string
Decrypts a string.
encrypt()  : string
Encrypts a string.
setIv()  : mixed
Sets the initialization vector (required for CBC mode).
supported()  : bool
Is this driver supported on this system?
_init()  : mixed
Initialize the subclass.
_pad()  : string
Pad text to match blocksize length.
_unpad()  : string
Unpad text from blocksize boundary.

Properties

$cipher

Cipher method.

public string $cipher

$iv

Initialization vector.

public string $iv = \null

$key

Encryption key.

public string $key

Methods

__construct()

Constructor.

public __construct(string $cipher) : mixed
Parameters
$cipher : string

Either 'ecb' or 'cbc'.

Return values
mixed

decrypt()

Decrypts a string.

public decrypt(mixed $text) : string
Parameters
$text : mixed

The string to encrypt.

Return values
string

The ciphertext.

encrypt()

Encrypts a string.

public encrypt(mixed $text) : string
Parameters
$text : mixed

The string to encrypt.

Return values
string

The ciphertext.

setIv()

Sets the initialization vector (required for CBC mode).

public setIv([string $iv = null ]) : mixed
Parameters
$iv : string = null

Initialization vector.

Return values
mixed

supported()

Is this driver supported on this system?

public static supported() : bool
Return values
bool

True if supported.

_init()

Initialize the subclass.

protected _init() : mixed
Return values
mixed

_pad()

Pad text to match blocksize length.

protected _pad(string $text[, bool $ignore = false ]) : string
Parameters
$text : string

Unpadded text.

$ignore : bool = false

Don't pad if already at blocksize length.

Return values
string

Padded text.

_unpad()

Unpad text from blocksize boundary.

protected _unpad(string $text) : string
Parameters
$text : string

Padded text.

Return values
string

Unpadded text.

Search results