Download the PHP package sukohi/mtriv without Composer
On this page you can find all versions of the php package sukohi/mtriv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor sukohi
Package mtriv
Short Description A PHP package mainly developed for Laravel to verfy simply.
License MIT
Package mtriv
Short Description A PHP package mainly developed for Laravel to verfy simply.
License MIT
Please rate this library. Is it a good library?
Informations about the package mtriv
Mtriv
A PHP package mainly developed for Laravel to verify simply.
(This is for Laravel 5+. For Laravel 4.2)
Installation
Add this package name in composer.json
"require": {
"sukohi/mtriv": "2.*"
}
Execute composer command.
composer update
Register the service provider in app.php
'providers' => [
...Others...,
Sukohi\Mtriv\MtrivServiceProvider::class,
]
Also alias
'aliases' => [
...Others...,
'Mtriv' => Sukohi\Mtriv\Facades\Mtriv::class
]
Usage
At first generate public key using secret key, string and expiration(skippable) like the following.
$str = 'STRING, ID and so on...';
$expiration = time(); // Skippable
$public_key = \Mtriv::secretKey('SECRET_KEY')->publicKey($str, $expiration);
and then you can verify.
if(\Mtriv::secretKey('SECRET_KEY')->check($str, $public_key, $expiration)) {
echo 'success!';
}
License
This package is licensed under the MIT License.
Copyright 2014 Sukohi Kuhoh
All versions of mtriv with dependencies
PHP Build Version
Package Version
Requires
laravel/framework Version
~5.0
The package sukohi/mtriv contains the following files
Loading the files please wait ....