Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
cipher.php
Aller à la documentation de ce fichier.
1 <?php
2 /**
3  * @package Joomla.Platform
4  * @subpackage Crypt
5  *
6  * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
7  * @license GNU General Public License version 2 or later; see LICENSE
8  */
9 
10 defined('JPATH_PLATFORM') or die;
11 
12 /**
13  * JCrypt cipher interface.
14  *
15  * @package Joomla.Platform
16  * @subpackage Crypt
17  * @since 12.1
18  */
19 interface JCryptCipher
20 {
21  /**
22  * Method to decrypt a data string.
23  *
24  * @param string $data The encrypted string to decrypt.
25  * @param JCryptKey $key The key[/pair] object to use for decryption.
26  *
27  * @return string The decrypted data string.
28  *
29  * @since 12.1
30  */
31  public function decrypt($data, JCryptKey $key);
32 
33  /**
34  * Method to encrypt a data string.
35  *
36  * @param string $data The data string to encrypt.
37  * @param JCryptKey $key The key[/pair] object to use for encryption.
38  *
39  * @return string The encrypted data string.
40  *
41  * @since 12.1
42  */
43  public function encrypt($data, JCryptKey $key);
44 
45  /**
46  * Method to generate a new encryption key[/pair] object.
47  *
48  * @param array $options Key generation options.
49  *
50  * @return JCryptKey
51  *
52  * @since 12.1
53  */
54  public function generateKey(array $options = array());
55 }