Skip to content

Simple and small library to generate and validate Time-Based-On-Time-Token

License

Notifications You must be signed in to change notification settings

StefanZimmermann98/laravel-totp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP TOTP Code Generation

Generate simple TOTP-Codes for multi-factor purpoises and validate them quickly.

Example

use StefanZ\LaravelTOTP\TOTP;

$token = (new TOTP('sha256', 0, 600))->GenerateToken('SUPER-SECRET', NULL, 8);


if (Validator::validate('SUPER-SECRET', 'XXXXXXXX', ['sha256', 0, 600])) {
    // Token is valid
}


About

Simple and small library to generate and validate Time-Based-On-Time-Token

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages