Hello I have two token functions that I use in my bridge from Second Life(LSL Script) to joomla it creates a the Token for the info coming from and to SL on the site.
Is there a way i can make these function global.So that i can call it from any of the pages in my Component rather then put them in every page.
//This is the Token decode function
function security_array_decode($myuuid, $token_salt)
{
$s_array = array();
$i = 0;
do {
$untime = time() - $i;
$arr = array($myuuid, $untime, $token_salt);
$token_key = sha1(join("",$arr));
$s_array[] = $token_key;
$s_array[] = $untime;
++$i;
} while ($i <= 5);
return $s_array;
}
//This is the Token encode function
function security_array_encode($myuuid, $token_salt)
{
$untime = time();
$arr2 = array($myuuid, $untime, $token_salt);
$token_key = sha1(join("",$arr2));
return $token_key;
}