Crypt_Blowfish Class Info:

Class Declaration:

class Crypt_Blowfish

File name:
Description:

Example usage: $bf = new Crypt_Blowfish('some secret key!'); $encrypted = $bf->encrypt('this is some example plain text'); $plaintext = $bf->decrypt($encrypted); echo "plain text: $plaintext";

Category

Encryption

Package
Crypt_Blowfish
Author

Matthew Fonda <mfonda@php.net>

Copyright

2005 Matthew Fonda

License

http://www.php.net/license/3_0.txt PHP License 3.0

Link
http://pear.php.net/package/Crypt_Blowfish
Version

1.0.1

Access

public

Properties:

Show/Hide parent properties
  • _iv string

    Initialization vector

  • _P array

    P-Array contains 18 32-bit subkeys

  • _S array

    Array of four S-Blocks each containing 256 32-bit entries

  • _td resource

    Mcrypt td resource

Crypt_Blowfish

top

Crypt_Blowfish Constructor Initializes the Crypt_Blowfish object, and gives a sets the secret key

Parameters:
  • string $key required

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 94
Access

public

_decipher

top

Deciphers a single 64 bit block

Parameters:
  • $Xl required

  • $Xr required

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 170
Access

private

decrypt

top

Decrypts an encrypted string

Parameters:
  • string $cipherText required

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 221
Return

string Returns plain text on success, PEAR_Error on failure

Access

public

_encipher

top

Enciphers a single 64 bit block

Parameters:
  • $Xl required

  • $Xr required

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 148
Access

private

encrypt

top

Encrypts a string

Parameters:
  • string $plainText required

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 192
Return

string Returns cipher text on success, PEAR_Error on failure

Access

public

init

top

Deprecated init method - init is now a private method and has been replaced with _init

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 124
Return

bool

Access

public

Deprecated

See

Crypt_Blowfish::_init()

_init

top

Initializes the Crypt_Blowfish object

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 134
Access

private

isReady

top

Deprecated isReady method

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 110
Return

bool

Access

public

Deprecated

setKey

top

Sets the secret key The key must be non-zero, and less than or equal to 56 characters in length.

Parameters:
  • string $key required

Method defined in:
/usr/share/php/Crypt/Blowfish.php on line 252
Return

bool Returns true on success, PEAR_Error on failure

Access

public