\Horde_Crypt

Provides an API for various cryptographic systems used by Horde applications.

Summary

Methods
Properties
Constants
factory()
__construct()
encrypt()
decrypt()
No public properties found
No constants found
No protected methods found
$_params
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Configuration parameters.

Type

array

Methods

factory()

factory(string  $driver, array  $params = array()) : \Horde_Crypt

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

Parameters

string $driver

Either a driver name, or the full class name to use (class must extend Horde_Crypt).

array $params

A hash containing any additional configuration or parameters a subclass might need.

Throws

\Horde_Crypt_Exception

Returns

\Horde_Crypt

The newly created concrete instance.

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

Configuration parameters:

  • email_charset: (string) The default email charset.

encrypt()

encrypt(string  $data, array  $params = array()) : array

Encrypt the requested data.

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

Parameters

string $data

The data to encrypt.

array $params

An array of arguments needed to encrypt the data.

Returns

array —

The encrypted data.

decrypt()

decrypt(string  $data, array  $params = array()) : array

Decrypt the requested data.

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

Parameters

string $data

The data to decrypt.

array $params

An array of arguments needed to decrypt the data.

Throws

\Horde_Crypt_Exception

Returns

array —

The decrypted data.