Re: mhash() without mhash library?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* and then Jochem Maas declared....
> Nick Wilson wrote:
> > hi all, 
> > 
> > can anyone tell me if it might be possible to do an mhash() without
> > actually having the mhash library installed? for various reasons it's
> > very impracticle to have a compiled version of php running on our
> > production servers and i'd really like to be able to use the alexa web
> > services.
> > 
> > here's the php snippet that wont work, just so you know what the aim
> > is..
> > 
> > function make_sig ( $secret_access_key, $service, $operation, $timestamp)
> > {
> >     $sig = $service . $operation . $timestamp;
> >     $hmac = mhash ( MHASH_SHA1, $sig, $secret_access_key );
> >     $encoded_hmac = base64_encode ( $hmac );
> >     return urlencode ( $encoded_hmac );
> > }
> > 
> > any thoughts?
> 
> read this page: http://php.net/sha1 (and search for 'hmac')
> no idea if the solution offered there actually works but hope it does the trick.

Wonderful, thanks. I'd seen the page, but neglected to look through the
comments. Im sure i can work it out from there. 

thanks again.
-- 
Nick Wilson
http://performancing.com/user/1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux