Name classes/structs consistently

This commit is contained in:
Danny Moesch 2020-04-19 15:41:30 +02:00 committed by Mingshen Sun
parent 072f824158
commit 4c2693e2c7
11 changed files with 80 additions and 80 deletions

View file

@ -8,7 +8,7 @@
import OneTimePassword
public enum OtpType: String {
public enum OTPType: String {
case totp = "TimeBased"
case hotp = "HmacBased"
case none = "None"

View file

@ -30,7 +30,7 @@ class TokenBuilder {
private var name: String = ""
private var secret: Data?
private var type: OtpType = .totp
private var type: OTPType = .totp
private var algorithm: Generator.Algorithm = .sha1
private var digits: Int? = Constants.DEFAULT_DIGITS
private var period: Double? = Constants.DEFAULT_PERIOD
@ -49,7 +49,7 @@ class TokenBuilder {
}
func usingType(_ type: String?) -> TokenBuilder {
self.type = OtpType(name: type)
self.type = OTPType(name: type)
return self
}