2017 © Pedro Peláez
 

library calc-api-sig

image

forevermatt/calc-api-sig

  • Thursday, September 3, 2015
  • by forevermatt
  • Repository
  • 2 Watchers
  • 1 Stars
  • 3,763 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Calc API Sig (calc-api-sig)

Helper class to simplify generating a signature for APIs that use HMAC, such as APIs using ApiAxle., (*1)

This uses a given shared secret to calculate a signature for a given API key prepended with the current unix timestamp. A different timestamp can optionally be specified, as can a particular hashing algorithm if something other than the default (SHA1) is desired., (*2)

Example Usages

Basic, (*3)

The expected common usage:, (*4)

$signature = \CalcApiSig\HmacSigner::CalcApiSig('api key', 'shared secret');

Advanced, (*5)

A more rare usage, in which the time used is 2 seconds in the future (perhaps to compensate for excessive latency) and the desired hashing algorithm is MD5:, (*6)

$signature = \CalcApiSig\HmacSigner::CalcApiSig(
    'api key',
    'shared secret',
    time() + 2,
    'md5'
);

License

Calc API Sig is licensed under the MIT license. See "LICENSE" for details., (*7)

The Versions

03/09 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

03/09 2015

0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

03/09 2015

dev-develop

dev-develop

  Sources   Download

MIT

The Requires

 

The Development Requires

05/05 2014

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires