2017 © Pedro Peláez
 

library totp

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

image

jp3cki/totp

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 29 % Grown

The README.md

totp

PHP implementation of RFC6238 (TOTP: Time-Based One-Time Password Algorithm)., (*1)

License Build Status Latest Stable Version Scrutinizer Code Quality Code Climate Test Coverage, (*2)

Requirements

  • PHP (64-bits): PHP 5.4.0 or later
  • PHP Extensions: hash, openssl

Install

  1. Set up Composer, the de facto standard package manager.
  2. php composer.phar require jp3cki/totp:^1.1

Usage

<?php
require_once('vendor/autoload.php');
use jp3cki\totp\Totp;

// Generate new shared-secret key (for each user)
$secret = Totp::generateKey();
echo "secret: {$secret}\n";
echo "\n";

// Make URI for importing from QRCode.
$uri = Totp::createKeyUriForGoogleAuthenticator($secret, 'theuser@example.com', 'Issuer Name');
echo "uri: {$uri}\n";
echo "\n";

// Verify user input
$userInput = '123456'; // $_POST['totp']
$isValid = Totp::verify($userInput, $secret, time());
var_dump($isValid);

License

The MIT License., (*3)

Copyright (c) 2015-2016 AIZAWA Hina <hina@bouhime.com>, (*4)

Contributing

Patches and/or report issues are welcome., (*5)

  • Please create new branch for each issue or feature. (should not work in master branch)
  • Please write and run test. $ make test
  • Please run check-style for static code analysis and coding rule checking. $ make check-style
  • Please clean up commits.
  • Please create new pull-request for each issue or feature.
  • Please gazing the results of Travis-CI and other hooks.
  • Please use Japanese or very simple English to create new pull-request or issue.

The Versions

05/04 2016

dev-master

9999999-dev

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

  Sources   Download

MIT

The Requires

 

The Development Requires

password otp totp rfc6238 onetime

05/04 2016

1.1.0

1.1.0.0

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

  Sources   Download

MIT

The Requires

 

The Development Requires

password otp totp rfc6238 onetime

18/02 2015

1.0.2

1.0.2.0

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

  Sources   Download

MIT

The Requires

 

The Development Requires

password otp totp rfc6238 onetime

17/02 2015

1.0.1

1.0.1.0

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

  Sources   Download

MIT

The Requires

 

The Development Requires

password otp totp rfc6238 onetime

16/02 2015

1.0.0

1.0.0.0

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

  Sources   Download

MIT

The Requires

 

The Development Requires

password otp totp rfc6238 onetime

14/02 2015

1.0.0-beta1

1.0.0.0-beta1

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

  Sources   Download

MIT

The Requires

 

The Development Requires

password otp totp rfc6238 onetime

08/02 2015

1.0.0-alpha1

1.0.0.0-alpha1

RFC 6238 / TOTP: Time-Based One-Time Password Algorithm

  Sources   Download

MIT

The Requires

 

The Development Requires

password rfc totp onetime 6238