Class Horde_Cipher

Description

The Horde_Cipher:: class provides a common abstracted interface to various Ciphers for encryption of arbitrary length pieces of data.

Copyright 2002-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

$Horde: framework/Cipher/Cipher.php,v 1.16.12.13 2009/03/04 20:34:27 slusarz Exp $

Located in /Cipher/Cipher.php (line 17)


	
			
Direct descendents
Class Description
 class Horde_Cipher_blowfish The Cipher_blowfish:: class implements the Cipher interface encryption data using the Blowfish algorithm.
 class Horde_Cipher_cast128 The Cipher_cast128:: class implements the Cipher interface encryption data using the CAST128 (aka Cast5) algorithm as defined in RFC2144.
 class Horde_Cipher_des The Cipher_des:: class implements the Cipher interface encryption data using the Data Encryption Standard (DES) algorithm as define in FIPS46-3.
 class Horde_Cipher_rc2 The Cipher_rc2:: class implements the Cipher interface encryption data using the RC2 algorithm as described in RFC2268.
 class Horde_Cipher_rc4 The Cipher_rc4:: class implements the Cipher interface encryption data using the RC4 encryption algorthim. This class uses the PEAR Crypt_RC4 class to do the encryption.
Variable Summary
 string $_blockMode
 string $_iv
Method Summary
 string decrypt (string $ciphertext)
 string encrypt (string $plaintext)
 Horde_Cipher &factory (string $cipher, [array $params = null])
 void setBlockMode (string $blockMode)
 void setIV (string $iv)
Variables
string $_blockMode = 'cbc' (line 24)

The block mode for the cipher chaining

string $_iv = null (line 31)

The initialization vector

Methods
decrypt (line 78)

Decrypt a string.

  • return: The decrypted data.
string decrypt (string $ciphertext)
  • string $ciphertext: The data to decrypt.
encrypt (line 60)

Encrypt a string.

  • return: The encrypted data.
string encrypt (string $plaintext)
  • string $plaintext: The data to encrypt.
factory (line 100)

Attempts to return a concrete Horde_Cipher instance.

  • return: The newly created concrete Horde_Cipher instance, or PEAR_Error on error.
Horde_Cipher &factory (string $cipher, [array $params = null])
  • string $cipher: The type of concrete Horde_Cipher subclass to return.
  • array $params: A hash containing any additional parameters a subclass might need.
setBlockMode (line 38)

Set the block mode for cipher chaining.

void setBlockMode (string $blockMode)
  • string $blockMode: The new blockmode.
setIV (line 48)

Set the IV.

void setIV (string $iv)
  • string $iv: The new IV.

Documentation generated on Sun, 30 Jan 2011 05:15:47 +0000 by phpDocumentor 1.4.3