akymos/otp

此包已被弃用,不再维护。未建议替代包。

PHP 库,实现 otp 认证(两步验证)

dev-master 2014-09-18 09:52 UTC

This package is not auto-updated.

Last update: 2022-05-23 14:01:59 UTC


README

#otp

otp 是一个 PHP 库,可实现 otp 认证(两步验证)

安装

akymos/otp 作为依赖添加到您的 composer.json 文件中。

{
    "require": {
        "akymos/otp": "dev-master"
    }
}

##使用示例 //基于时间的 $tb = new Akymos\Otp\TimeBased(); $tb->setSecretKey("yoursecretkey"); $tb->verify("457584");

//Counter Based
$cb = new Akymos\Otp\CounterBased();
$cb->setSecretKey("yoursecretkey");
$cb->verify("343434", 1);