easeappphp/hmac
最新稳定版本:1.0.3
Composer 安装命令:
composer require easeappphp/hmac
包简介
A very simple and safe PHP library that provides methods to handle HMAC in applications.
README 文档
README
A very simple and safe PHP library that provides methods to handle HMAC in applications.
Getting started
With Composer, run
composer require easeappphp/hmac:^1.0.3
Note that the vendor folder and the vendor/autoload.php script are generated by Composer; they are not part of PDOLight.
To include the library,
<?php require 'vendor/autoload.php'; use \EaseAppPHP\Hmac\Hmac; $hmac = new Hmac();
Create Secret Key
$secretKey = $hmac->createSecret(1000, true, true);
Create Signature
$message = "Hello!, I am creating a Signature with the HMAC Class"; $createdSignature = $hmac->createSignature("sha256", $message, $secretKey, true, true);
Verify Signature
$signatureVerificationResult = $hmac->verifySignature($createdSignature, $userSuppliedSignature); echo "verification result: <br>"; var_dump($signatureVerificationResult);
License
This software is distributed under the MIT license. Please read LICENSE for information on the software availability and distribution.
统计信息
- 总下载量: 1.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-01-29