1. Go to this page and download the library: Download lswl/sign 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/ */
lswl / sign example snippets
use Lswl\Signature\HttpBuildQuery;
use Lswl\Signature\Json;
// 数据
$data = [
'key' => 'value',
];
// 密钥
$key = 'key';
// 使用 http_build_query 方式签名
$sign = (new HttpBuildQuery($data, $key))->sign();
// 使用 json 方式签名
$sign = (new Json($data, $key))->sign();