Move parts of the documentation into the TokenBuilder class
This commit is contained in:
parent
2e744a760f
commit
469451b7b7
2 changed files with 31 additions and 23 deletions
|
|
@ -9,6 +9,23 @@
|
|||
import Base32
|
||||
import OneTimePassword
|
||||
|
||||
/// Help building an OTP token from given data.
|
||||
///
|
||||
/// There is currently support TOTP and HOTP tokens:
|
||||
///
|
||||
/// * Necessary TOTP data
|
||||
/// * secret: `secretsecretsecretsecretsecretsecret`
|
||||
/// * type: `totp`
|
||||
/// * algorithm: `sha1` (default: `sha1`, optional)
|
||||
/// * period: `30` (default: `30`, optional)
|
||||
/// * digits: `6` (default: `6`, optional)
|
||||
///
|
||||
/// * Necessary HOTP data
|
||||
/// * secret: `secretsecretsecretsecretsecretsecret`
|
||||
/// * type: `hotp`
|
||||
/// * counter: `1`
|
||||
/// * digits: `6` (default: `6`, optional)
|
||||
///
|
||||
class TokenBuilder {
|
||||
|
||||
private var name: String = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue