         var bigCounter = counter.bigEndian
 
         // Generate an HMAC value from the key and counter
-        let (hashAlgorithm, hashLength) = hashInfoForAlgorithm(algorithm)
+        let (hashAlgorithm, hashLength) = algorithm.hashInfo
         let hashPointer = UnsafeMutablePointer<UInt8>.alloc(hashLength)
         defer { hashPointer.dealloc(hashLength) }
         CCHmac(hashAlgorithm, secret.bytes, secret.length, &bigCounter, sizeof(UInt64), hashPointer)

        case SHA256
        /// The SHA-512 hash function
        case SHA512
    }

    /// An error type enum representing the various errors a `Generator` can throw when computing a

        }
    }

    /// Generates a one-time password using the HOTP algorithm.
    // https://tools.ietf.org/html/rfc4226#section-5
    @warn_unused_result
