JUtility/getHash: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Provides a secure hash based on a seed
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]<... |
m clean up |
||
| Line 2: | Line 2: | ||
Provides a secure hash based on a seed | Provides a secure hash based on a seed | ||
{{Description:JUtility/getHash}} | |||
{{subst:Description:JUtility/getHash}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 39: | Line 37: | ||
</source> | </source> | ||
{{subst:SeeAlso:JUtility/getHash}} | |||
{{SeeAlso:JUtility/getHash}} | |||
===Examples=== | ===Examples=== | ||
Revision as of 14:36, 24 March 2017
Description
Provides a secure hash based on a seed
{{subst:Description:JUtility/getHash}}
Syntax
static getHash($seed)
| Parameter Name | Default Value | Description |
|---|---|---|
| $seed | Seed string |
Returns
string
Defined in
libraries/joomla/utilities/utility.php
Importing
jimport( 'joomla.utilities.utility' );
Source Body
public static function getHash($seed)
{
$conf = &JFactory::getConfig();
return md5($conf->getValue('config.secret') . $seed );
}
{{subst:SeeAlso:JUtility/getHash}}
Examples
<CodeExamplesForm />