 // Constants used throughout this file
 //
 let hex = "0123456789abcdef"
-let base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
+let base64 = [Character]("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".characters)
 
 //
 // Exception types

//
func convertHexToBase64(input: String) throws -> String {

    // an empty input string produces an empty Base64 string
    guard !input.isEmpty else {
        return ""
    }

    let bytes = try? convertHexToBytes(input)

    var result = ""

    // for each 6-bit chunk

        // map 6-bit chunk to Base64 index table

        // add encoded character to result

    return result
}


    // for this unit test, the input is valid so we don't have to catch the exception
    let result = try! convertHexToBase64(input)
    
    print("expected\t\(output)\noutput\t\t\(result)")

    return (result == output)
}
