API16

JUtility/getHash: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Provides a secure hash based on a seed <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]<...
 
m preparing for archive only
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
Provides a secure hash based on a seed
Provides a secure hash based on a seed


<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JUtility/getHash|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JUtility/getHash}}
 
 


===Syntax===
===Syntax===
Line 39: Line 37:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JUtility/getHash|Edit See Also]]<nowiki>]</nowiki>
 
</span>
{{SeeAlso:JUtility/getHash}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=getHash
  category=getHash
  category=JUtility
  category=JUtility
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 02:16, 25 March 2017

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