API16

API16:JUtility/getHash

From Joomla! Documentation

Revision as of 02:16, 25 March 2017 by JoomlaWikiBot (talk | contribs) (preparing for archive only)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Provides a secure hash based on a seed



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 );
}



Examples

Code Examples