PHP code example of liuyuit / signature-helper
1. Go to this page and download the library: Download liuyuit/signature-helper 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/ */
liuyuit / signature-helper example snippets
liuyuit\SignatureHelper\SignatureHelper;
$params = [
'a' => 'a_value',
'b' => 'b_value',
];
$secreteKey = 'keyasf234laf';
$signatureHelper = new SignatureHelper();
$sign = $signatureHelper->sign($params, $secreteKey);
echo $sign . PHP_EOL; //3b61a95a6a39e73088d8ac4f13ddb7a1
$signatureHelper->verifySignature($params, $sign, $secreteKey); // true