API15:JSimpleCrypt/ construct
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Object Constructor takes an optional key to be used for encryption/decryption. If no key is given then the secret word from the configuration object is used.
Description:JSimpleCrypt/ construct
Syntax
__construct($key=null)
| Parameter Name | Default Value | Description |
|---|---|---|
| $key | null | $key Optional encryption key |
Returns
void
Defined in
libraries/joomla/utilities/simplecrypt.php
Importing
jimport( 'joomla.utilities.simplecrypt' );
Source Body
function __construct($key = null) { if ($key) { $this->_key = (string) $key; } else { $conf = &JFactory::getConfig(); $this->_key = md5($conf->getValue('config.secret')); } }
[Edit See Also] SeeAlso:JSimpleCrypt/ construct
Examples
<CodeExamplesForm />
