frowhy/认证

v2.1.3 2016-12-21 03:33 UTC

This package is auto-updated.

Last update: 2024-08-29 04:40:10 UTC


README

安装

推荐通过 PackagistComposer 安装。运行以下命令来安装此包并将其添加到项目的 composer.json 文件中

composer require frowhy/authentication

示例

use Frowhy\Authentication\Authentication;

require_once __DIR__ . '/vendor/autoload.php';
header('Content-type: application/json');

$str = 'aaa';
$salt = 'bbb';
$make = Authentication::make($str, $salt);
$state = Authentication::verify($make);
$sign = Authentication::get($make, $salt);

echo json_encode(['make' => $make, 'state' => $state, 'sign' => $sign]);