2017 © Pedro Peláez
 

library totp

PHP5.6+ compatible implementation of the TOTP protocol.

image

ericmann/totp

PHP5.6+ compatible implementation of the TOTP protocol.

  • Thursday, November 23, 2017
  • by ericmann
  • Repository
  • 1 Watchers
  • 1 Stars
  • 51 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

TOTP PHP 7.4+ Build Status PHPStan ![Coverage Status][coveralls-image] Packagist

A PHP library for generating one-time passwords according to RFC-6238 for time-based OTP generation., (*1)

This library is compatible with Google Authenticator apps available for Android and iPhone., (*2)

Quick Start

Use Composer to add ericmann/totp to your project., (*3)

require __DIR__ . '/vendor/autoload.php';

// Create a new, random token
$token = new EAMann\TOTP\Key();

// Import a known token
$raw = '...';
$token = EAMann\TOTP\Key::import($raw);

// Validate an OTP against a token
if (EAMann\TOTP\is_valid_auth_code($token, $otp)) {
  // ...
}

The Versions

19/11 2017

1.0.0

1.0.0.0

PHP5.6+ compatible implementation of the TOTP protocol.

  Sources   Download

MIT

The Requires

 

The Development Requires