Update README.md

This commit is contained in:
AJ ONeal 2016-01-02 01:15:06 -08:00
parent 524283161e
commit 0178e8b89d
1 changed files with 8 additions and 14 deletions

View File

@ -78,23 +78,17 @@ authenticator --qr
API
---
### generateKey()
```javascript
generateKey() // generates a 32-character (160-bit) base32 key
generates a 32-character (160-bit) base32 key
generateToken(formattedKey) // generates a 6-digit (20-bit) decimal time-based token
### generateToken(formattedKey)
verifyToken(formattedKey, formattedToken) // validates a time-based token within a +/- 30 second (90 seconds) window
// returns `null` on failure or an object such as `{ delta: 0 }` on success
generates a 6-digit (20-bit) decimal time-based token
### verifyToken(formattedKey, formattedToken)
validates a time-based token within a +/- 30 second (90 seconds) window
returns `null` on failure or an object such as `{ delta: 0 }` on success
### generateTotpUri(formattedKey, accountName, issuer, algorithm, digits, period)
generates an `OTPAUTH://` scheme URI for QR Code generation.
// generates an `OTPAUTH://` scheme URI for QR Code generation.
generateTotpUri(formattedKey, accountName, issuer, algorithm, digits, period)
```
**OTPAuth Scheme**