frowhy/authentication

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

This package is auto-updated.

Last update: 2024-03-29 03:38:05 UTC


README

Installation

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

composer require frowhy/authentication

Examples

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]);