get HMAC

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
egoo
-


Joined: 22 Jan 2008
Posts: 16

PostPosted: Mon Mar 10, 2008 11:21 am    Post subject: get HMAC Reply with quote

I'm using PHP5 and PHP Designer 2007 ver 5.4. But when Icompile the script there is an error:
require_once('Crypt/HMAC.php');

/* RFC препоръчва размер на ключа, по-голям от резултатния хеш
* за използваната функция за хеширане (16 за md5()и 20 за sha1()).*/
define('SECRET KEY','Professional PHP5 Programming Example');

function create_parameters($array)
{
$data='';
$ret=$array();

/* Koнструиране на низа с нашите двойки ключ/стойност */
foreach($array as $key=>$value)
{
$data.=$key.$value;
$ret[] = "$key=$value";
}

$h=new Crypt_HMAC(SECRET_KEY,'md5');
$hash = $h->hash($data);
$ret[] = "hash=$hash";

return join('&', $ret);
}

echo '<a href=script.php?'.
create_parameters(array('cause'=>'vars')).'>err!</a>';
?>
On the row "require_once('Crypt/HMAC.php');" it appears an error: Failed opening required' Grypt/HMAC.php'
Please, hepl me. Thank you in advance?
Back to top View user's profile Send private message
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Mon Mar 10, 2008 1:15 pm    Post subject: Reply with quote

That error means that the file Crypt/HMAC.php doesn't exist at the specified location.
_________________
Olly
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group