Crypt_Blowfish
[ class tree: Crypt_Blowfish ] [ index: Crypt_Blowfish ] [ all elements ]

Class: Crypt_Blowfish

Source Location: /Crypt_Blowfish-0.8.1/Blowfish.php

Class Overview


Example usage:


Author(s):

Version:

  • @package_version@

Copyright:

  • 2005 Matthew Fonda

Methods


Inherited Variables

Inherited Methods


Class Details

[line 51]
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";



[ Top ]


Method Detail

Crypt_Blowfish (Constructor)   [line 79]

Crypt_Blowfish Crypt_Blowfish( [string $key = null])

Crypt_Blowfish Constructor Initializes the Crypt_Blowfish object, and gives a sets the secret key if one is provided
  • Access: public

Parameters:

string   $key   — 

[ Top ]

decrypt   [line 195]

string decrypt( string $cipherText)

Decrypts an encrypted string
  • Return: Returns plain text on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $cipherText   — 

[ Top ]

encrypt   [line 173]

string encrypt( string $plainText)

Encrypts a string
  • Return: Returns cipher text on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $plainText   — 

[ Top ]

init   [line 105]

bool init( )

Deprecated init method - init is now a private method and has been replaced with _init
  • See: Crypt_Blowfish::_init()
  • Deprecated:
  • Access: public

[ Top ]

isReady   [line 91]

bool isReady( )

Deprecated isReady method
  • Deprecated:
  • Access: public

[ Top ]

setKey   [line 222]

bool setKey( [string $key = null])

Sets the secret key

The key must be greater than or equal to 4 characters in length, and less than or equal to 56 characters in length. It must also be divisible by four. If the optional key parameter is not passed, it will set the key back to the default key.

  • Return: Returns true on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $key   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:30:41 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.