forked from ritou/php-Akita_OATH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
34 lines (25 loc) · 824 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Akita_OATH
======================================================
This is php OATH One Time Passwords Library.
OATH : http://www.openauthentication.org/
HOTP : http://tools.ietf.org/html/rfc4226
TOTP : http://tools.ietf.org/html/rfc6238
Usage
------------------------------------------------------
$secret is raw secret(not Base32 encoded).
$counter is used HOTP.
$oath = new oath();
// Generate HOTP
$hotp = $oath->hotp($secret, $counter);
// HOTP Validation
$status = $oath->validateHotp($hotp, $secret, $counter);
// Generate TOTP
$totp = $oath->totp($secret);
// TOTP Validation
$status = $oath->validateTotp($totp, $secret);
AUTHOR
------------------------------------------------------
@ritou [email protected]
LISENCE
------------------------------------------------------
MIT Lisense.