8000 GitHub - laravison/otphp: :closed_lock_with_key: A PHP library for generating one time passwords according to RFC 4226 (HOTP Algorithm) and the RFC 6238 (TOTP Algorithm)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
forked from Spomky-Labs/otphp

🔐 A PHP library for generating one time passwords according to RFC 4226 (HOTP Algorithm) and the RFC 6238 (TOTP Algorithm)

License

Notifications You must be signed in to change notification settings

laravison/otphp

 
 

Repository files navigation

TOTP / HOTP library in PHP

Help me out for a couple of 🍻!

Beerpay Beerpay


Join the chat at https://gitter.im/Spomky-Labs/otphp

Scrutinizer Code Quality Coverage Status

Build Status HHVM Status PHP 7 ready

SensioLabsInsight

Latest Stable Version Total Downloads Latest Unstable Version License

A php library for generating one time passwords according to RFC 4226 (HOTP Algorithm) and RFC 6238 (TOTP Algorithm)

This library is compatible with Google Authenticator apps available for Android and iPhone. It is also compatible with other applications such as FreeOTP for example.

The Release Process

The release process is described here.

Prerequisites

This library needs at least PHP 5.5. It has been successfully tested using PHP 5.5, PHP 5.6, PHP 7 (stable and nightly branches) and HHVM.

Installation

The preferred way to install this library is to rely on Composer:

composer require spomky-labs/otphp

By default, documentation and test environment are excluded. If you want to test the library or get the documentation, please add --prefer-source option:

composer require spomky-labs/otphp --prefer-source

TOTP or HOTP?

This library provides both TOTP and HOTP.

TOTP is a time based one-time password. It lives only for a few seconds (the period). You just have to be sure that the clock of your server and your device are synchronized. This is the most common OTP.

HOTP is a counter based one-time password. Every time a password is used, the counter is updated. You have to verify that the server and the device are synchronized.

How to use

Have a look at How to use to initialize and generate your first OTP.

Contributing

Requests for new features, bug fixed and all other ideas to make this library useful are welcome. Please follow these best practices.

Licence

This software is release under the MIT licence.

About

🔐 A PHP library for generating one time passwords according to RFC 4226 (HOTP Algorithm) and the RFC 6238 (TOTP Algorithm)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%
0