承接 texdc/totp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

texdc/totp

Composer 安装命令:

composer require texdc/totp

包简介

Simple TOTP (RFC 6238)

README 文档

README

TOTP is a simple, compact and bare-bones PHP class for calculating TOTP tokens using the SHA1 default, commonly used for two-factor authentication in mobile apps such as Google Authenticator. It comprises three public methods of which only one is necessary to call to get a token.

Usage

Simply call $totp->getOTP( $secret [, $digits = 6 [, $period = 30 [, $offset = null ]]] ) which returns a string holding the authentication token.

The other two functions are meant to be convenient utilities:

$totp->genSecret( [ $length = 24 ] ) generates a TOTP-compatible pseudorandom secret in Base32 ASCII, returning a string holding the random secret.

$totp->genURI( $account, $secret [, $digits = null [, $period = null [, $issuer = '' ]]] ) returns a string holding an otpauth:// style URI providing the supplied parameters, which can be embedded in a QR code image.

NOTE: All arguments are validated and every method may throw an Assert\AssertionFailedException detailing the error.

License

TOTP is released under the Creative Commons BY-NC-SA 4.0 license.

Portions Copyright (c) 2014 Robin Leffman. The original source is available on github.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: CC-BY-NC-SA-4.0
  • 更新时间: 2016-05-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固