 import OneTimePassword
 
 public class OTPToken: NSObject {
+    public var name: String = ""
+    public var issuer: String = ""
+    public var type: OTPTokenType  = .Timer
+    public var secret: NSData = NSData()
+    public var algorithm: OTPAlgorithm = OTPToken.defaultAlgorithm()
+    public var digits: UInt = OTPToken.defaultDigits()
+    public var period: NSTimeInterval = OTPToken.defaultPeriod()
+    public var counter: UInt64 = OTPToken.defaultInitialCounter()
+
+    required public override init() {}
+
     var token: Token? {
         return tokenForOTPToken(self)
     }

        }
    }

    required override public init() {
        name = ""
        issuer = ""
        secret = NSData()
        type = .Timer
        period = OTPToken.defaultPeriod()
        counter = OTPToken.defaultInitialCounter()
        algorithm = OTPToken.defaultAlgorithm()
        digits = OTPToken.defaultDigits()
    }

    class func tokenWithType(type: OTPTokenType, secret: NSData, name: NSString, issuer:NSString) -> Self {
        let token = self()
        token.type = type

        token.issuer = issuer
        return token
    }

    public class func defaultAlgorithm() -> OTPAlgorithm {
        return .SHA1
