frowhy / authentication
鉴权类
v2.1.3
2016-12-21 03:33 UTC
Requires
- php: >=5.2
- ircmaxell/password-compat: ^1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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]);