PHPackages                             williameggers/php-totp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. williameggers/php-totp

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

williameggers/php-totp
======================

TOTP/HOTP library for PHP

1.0.0(4y ago)329.7k↓13.3%MITPHPPHP ^7.3 || ^7.4 || ^8.0

Since Oct 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/williameggers/php-totp)[ Packagist](https://packagist.org/packages/williameggers/php-totp)[ RSS](/packages/williameggers-php-totp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

HOTP/TOTP Token Generator
=========================

[](#hotptotp-token-generator)

This is a simple PHP library and script that will generate HOTP and TOTP tokens. The library fully conforms to RFCs 4226 and 6238. All hashing algorithms are supported as well as the length of a token and the start time for TOTP.

Installation
------------

[](#installation)

Add the following to your composer.json:

```
{
    "require": {
        "williameggers/php-totp": "^1.0"
    }
}

```

And run `composer install`.

Usage
-----

[](#usage)

```
