Class Horde_Crypt

Description

The Horde_Crypt:: class provides an API for various cryptographic systems used by Horde applications.

$Horde: framework/Crypt/Crypt.php,v 1.27.10.16 2009/01/06 15:23:00 jan Exp $

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.

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


	
			
Direct descendents
Class Description
 class Horde_Crypt_pgp Horde_Crypt_pgp:: provides a framework for Horde applications to interact with the GNU Privacy Guard program ("GnuPG"). GnuPG implements the OpenPGP standard (RFC 2440).
 class Horde_Crypt_smime Horde_Crypt_smime:: provides a framework for Horde applications to interact with the OpenSSL library and implement S/MIME.
Variable Summary
 string $_tempdir
Method Summary
 array decrypt (string $data, [array $params = array()])
 array encrypt (string $data, [array $params = array()])
 Horde_Crypt factory (mixed $driver, [array $params = array()])
 PEAR_Error requireSecureConnection ()
 Horde_Crypt &singleton (mixed $driver, [array $params = array()])
Variables
string $_tempdir (line 24)

The temporary directory to use.

Methods
decrypt (line 161)

Decrypt the requested data.

This method should be provided by all classes that extend Horde_Crypt.

  • return: The decrypted data.
array decrypt (string $data, [array $params = array()])
  • string $data: The data to decrypt.
  • array $params: An array of arguments needed to decrypt the data.

Redefined in descendants as:
encrypt (line 147)

Encrypt the requested data.

This method should be provided by all classes that extend Horde_Crypt.

  • return: The encrypted data.
array encrypt (string $data, [array $params = array()])
  • string $data: The data to encrypt.
  • array $params: An array of arguments needed to encrypt the data.

Redefined in descendants as:
factory (line 39)

Attempts to return a concrete Horde_Crypt instance based on $driver.

  • return: The newly created concrete Horde_Crypt instance, or false on an error.
Horde_Crypt factory (mixed $driver, [array $params = array()])
  • mixed $driver: The type of concrete Horde_Crypt subclass to return. If $driver is an array, then we will look in $driver[0]/lib/Crypt/ for the subclass implementation named $driver[1].php.
  • array $params: A hash containing any additional configuration or parameters a subclass might need.
requireSecureConnection (line 107)

Outputs error message if we are not using a secure connection.

  • return: Returns a PEAR_Error object if there is no secure connection.
PEAR_Error requireSecureConnection ()
singleton (line 89)

Attempts to return a reference to a concrete Horde_Crypt instance based on $driver. It will only create a new instance if no Horde_Crypt instance with the same parameters currently exists.

This should be used if multiple crypto backends (and, thus, multiple Horde_Crypt instances) are required.

This method must be invoked as: $var = &Horde_Crypt::singleton()

  • return: The concrete Horde_Crypt reference, or false on an error.
Horde_Crypt &singleton (mixed $driver, [array $params = array()])
  • mixed $driver: The type of concrete Horde_Crypt subclass to return. If $driver is an array, then we will look in $driver[0]/lib/Crypt/ for the subclass implementation named $driver[1].php.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.

Documentation generated on Sun, 30 Jan 2011 05:16:07 +0000 by phpDocumentor 1.4.3