 import OneTimePassword
 
 public class OTPToken: NSObject {
-    var token: Token?
+    var token: Token? {
+        return tokenForOTPToken(self)
+    }
     var keychainItem: Token.KeychainItem?
 
     required public init(token: Token?) {
-        self.token = token
         self.name = token?.name ?? ""
         self.issuer = token?.issuer ?? ""
 


    func updatePassword() {
        if let token = token {
            self.token = updatedToken(token)
        }
    }


        return token
    }

    public var name: String
    public var issuer: String
    public var type: OTPTokenType
    public var secret: NSData
    public var algorithm: OTPAlgorithm
    public var digits: UInt
    public var period: NSTimeInterval
    public var counter: UInt64

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