Download the PHP package krak/hmac without Composer

On this page you can find all versions of the php package krak/hmac. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hmac

Hmac

Hmac is a library for handling hmac authentication. Look at the source code for documentation.

Usage

HmacConfig

The HmacConfig is passed at creation to the signer and authenticator to allow total configuration of how the request is authed or signed. The same config needs to be provided to the sign and the auth for them to inverse each other.

Here are the options:

Signers

hmac_sign_request is the default signer which creates sign function that accepts an HmacRequest and HmacKeyPair.

hmac_psr7_sign_request is a decorated signer around the hmac_sign_request for accepting and returning Psr Http Requests. It simply just wraps hmac_sign_request around the hmac_psr7_sign decorator.

hmac_psr7_sign is a decorator sign function that accepts a sign function and wraps it and returns a sign function that will accept and return Psr Http Requests.

Hash String Generator

The hash string generators are functions that take the request and time value and generate the string that will end up being hashed.

provided hs_gen funcs:

// returns a hs_gen that will md5 hash the content and join everything by the given separator
hmac_hashed_hs_gen($sep = "\n");

example:

Time Generator

A time generator is just used to generate a time unit like a timestamp or date stamp.

provided time_gen funcs:

// returns the `time` function which creates a unix timestamp
hmac_ts_time_gen();

// returns a time_gen which creates an RFC 2822  formatted date
hmac_date_time_gen();

Integration

GuzzleHttp

Simple integration with Guzzle can be done via the Provider/guzzle.php functions.


All versions of hmac with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package krak/hmac contains the following files

Loading the files please wait ....