     // https://tools.ietf.org/html/rfc6238#appendix-B
     func testTOTPRFCValues() {
         let secretKeys = [
-            OTPAlgorithm.SHA1:   "12345678901234567890",
-            OTPAlgorithm.SHA256: "12345678901234567890123456789012",
-            OTPAlgorithm.SHA512: "1234567890123456789012345678901234567890123456789012345678901234",
+            Token.Algorithm.SHA1:   "12345678901234567890",
+            Token.Algorithm.SHA256: "12345678901234567890123456789012",
+            Token.Algorithm.SHA512: "1234567890123456789012345678901234567890123456789012345678901234",
         ]
 
         let times: Array<NSTimeInterval> = [

    // https://code.google.com/p/google-authenticator/source/browse/mobile/ios/Classes/TOTPGeneratorTest.m
    func testTOTPGoogleValues() {
        let secret = "12345678901234567890".dataUsingEncoding(NSASCIIStringEncoding)
        let intervals: Array<NSTimeInterval> = [1111111111, 1234567890, 2000000000]
        let algorithms = [OTPAlgorithm.SHA1, OTPAlgorithm.SHA256, OTPAlgorithm.SHA512]

        let results = [
            // SHA1    SHA256    SHA512
            "050471", "584430", "380122", // date1
            "005924", "829826", "671578", // date2
            "279037", "428693", "464532", // date3
        ]

        for (var i = 0, j = 0; i < intervals.count; i++) {
            for algorithm in algorithms {
                let token = Token(type: .Timer, secret: secret, algorithm: algorithm, digits: 6, period: 30)
                let counter = UInt64(intervals[i] / token.period)
                
                XCTAssertEqualObjects(results[j],
                                      token.passwordForCounter(counter),
                                      "Invalid result \(i), \(algorithm), \(intervals[i])")
                j++
            }
        }
    }

        ]

        for expectedPassword: String in expectedValues {
            XCTAssertEqualObjects(token.password(), expectedPassword, "The generator did not produce the expected OTP.")
            token = token.updatedToken()
        }
    }

