         ]
 
         let expectedValues = [
-            OTPAlgorithm.SHA1:   ["94287082", "07081804", "14050471", "89005924", "69279037", "65353130"],
-            OTPAlgorithm.SHA256: ["46119246", "68084774", "67062674", "91819424", "90698825", "77737706"],
-            OTPAlgorithm.SHA512: ["90693936", "25091201", "99943326", "93441116", "38618901", "47863826"],
+            Token.Algorithm.SHA1:   ["94287082", "07081804", "14050471", "89005924", "69279037", "65353130"],
+            Token.Algorithm.SHA256: ["46119246", "68084774", "67062674", "91819424", "90698825", "77737706"],
+            Token.Algorithm.SHA512: ["90693936", "25091201", "99943326", "93441116", "38618901", "47863826"],
         ]
 
         for (algorithm, secretKey) in secretKeys {

import OneTimePassword

class TokenGenerationTests: XCTestCase {

    // The values in this test are found in Appendix D of the HOTP RFC
    // https://tools.ietf.org/html/rfc4226#appendix-D
    func testHOTPRFCValues() {
        let secret = "12345678901234567890".dataUsingEncoding(NSASCIIStringEncoding)
        var token = Token(type: .Counter, secret: secret, algorithm: .SHA1, digits: 6, counter: 0)

        XCTAssertEqualObjects("755224", token.passwordForCounter(0), "The 0th OTP should be the expected string.")
        XCTAssertEqualObjects("755224", token.passwordForCounter(0), "The generatePasswordForCounter: method should be idempotent.")

        let expectedValues = [
            "287082",

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

        let times: Array<NSTimeInterval> = [
