Use constants for otp_* and other related strings
This commit is contained in:
parent
60c509dba0
commit
1f57305203
2 changed files with 37 additions and 22 deletions
|
|
@ -8,23 +8,38 @@
|
|||
|
||||
public struct Constants {
|
||||
|
||||
static let OTP_SECRET = "otp_secret"
|
||||
static let OTP_TYPE = "otp_type"
|
||||
static let OTP_ALGORITHM = "otp_algorithm"
|
||||
static let OTP_PERIOD = "otp_period"
|
||||
static let OTP_DIGITS = "otp_digits"
|
||||
static let OTP_COUNTER = "otp_counter"
|
||||
static let OTPAUTH = "otpauth"
|
||||
|
||||
public static let OTP_KEYWORDS = [
|
||||
"otp_secret",
|
||||
"otp_type",
|
||||
"otp_algorithm",
|
||||
"otp_period",
|
||||
"otp_digits",
|
||||
"otp_counter",
|
||||
"otpauth",
|
||||
OTP_SECRET,
|
||||
OTP_TYPE,
|
||||
OTP_ALGORITHM,
|
||||
OTP_PERIOD,
|
||||
OTP_DIGITS,
|
||||
OTP_COUNTER,
|
||||
OTPAUTH,
|
||||
]
|
||||
|
||||
static let TOTP = "totp"
|
||||
static let HOTP = "hotp"
|
||||
static let SHA256 = "sha256"
|
||||
static let SHA512 = "sha512"
|
||||
static let DEFAULT_DIGITS = "6"
|
||||
static let DEFAULT_PERIOD = "30.0"
|
||||
static let DEFAULT_COUNTER = ""
|
||||
|
||||
static let BLANK = " "
|
||||
static let MULTILINE_WITH_LINE_BREAK_INDICATOR = "|"
|
||||
static let MULTILINE_WITH_LINE_BREAK_SEPARATOR = "\n"
|
||||
static let MULTILINE_WITHOUT_LINE_BREAK_INDICATOR = ">"
|
||||
static let MULTILINE_WITHOUT_LINE_BREAK_SEPARATOR = BLANK
|
||||
|
||||
static let OTPAUTH = "otpauth"
|
||||
static let OTPAUTH_URL_START = "\(OTPAUTH)://"
|
||||
static let PASSWORD_KEYWORD = "password"
|
||||
static let USERNAME_KEYWORD = "username"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue