PHP code example of c-squared-solutions-llc / hmac-util

1. Go to this page and download the library: Download c-squared-solutions-llc/hmac-util library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

c-squared-solutions-llc / hmac-util example snippets




$hmac_request = new CSquaredSolutionsLlc\HmacUtil\HmacRequest();

$hmac_request->setAlgorithm('sha256');
$hmac_request->setCreds("testing","testing");

$hmac_request->request_line = 'POST /test HTTP/1.1';

$hmac_request->body = '{test: 1}';

$hmac_request->headers = [
	'Content-Type' => 'application/json',
	'Content-Length' => 115252
];

$hmac_util = new CSquaredSolutionsLlc\HmacUtil\HmacUtil();

$hmac_request = $hmac_util->sign($hmac_request);