sukohi/mtriv 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sukohi/mtriv

Composer 安装命令:

composer require sukohi/mtriv

包简介

A PHP package mainly developed for Laravel to verfy simply.

README 文档

README

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

统计信息

  • 总下载量: 48
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固