JSimpleCrypt/ construct
From Joomla! Documentation
< API15:JSimpleCrypt
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
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.
Template:Description:JSimpleCrypt/ construct
Syntax[edit]
__construct($key=null)
Parameter Name | Default Value | Description |
---|---|---|
$key | null | $key Optional encryption key |
Returns[edit]
void
Defined in[edit]
libraries/joomla/utilities/simplecrypt.php
Importing[edit]
jimport( 'joomla.utilities.simplecrypt' );
Source Body[edit]
function __construct($key = null)
{
if ($key) {
$this->_key = (string) $key;
} else {
$conf = &JFactory::getConfig();
$this->_key = md5($conf->getValue('config.secret'));
}
}
[Edit See Also] Template:SeeAlso:JSimpleCrypt/ construct
Examples[edit]
<CodeExamplesForm />