Move parts of the documentation into the TokenBuilder class

This commit is contained in:
Danny Moesch 2018-12-02 16:55:35 +01:00 committed by Bob Sun
parent 2e744a760f
commit 469451b7b7
2 changed files with 31 additions and 23 deletions

View file

@ -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 = ""