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

Class: Crypt_Blowfish

Source Location: /Crypt_Blowfish-0.7.0/Blowfish.php

Class Overview


Example usage:


Author(s):

Version:

  • 0.7.0

Copyright:

  • 2005 Matthew Fonda

Methods


Inherited Variables

Inherited Methods


Class Details

[line 75]
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 110]

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 232]

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 205]

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 126]

bool init( )

Initializes the Crypt_Blowfish object
  • Access: public

[ Top ]

isReady   [line 149]

bool isReady( )

Function to check if the Crypt_Blowfish object is ready to be used or not
  • Access: public

[ Top ]

setKey   [line 262]

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.
  • Return: Returns true on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $key     

[ Top ]


Documentation generated on Tue, 22 Feb 2005 23:30:05 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.