     }
 
     // extract raw bytes from input
-    var bytes = [UInt8](count: input.characters.count / 2, repeatedValue: 0)
+    var result = [Int](count: input.characters.count / 2, repeatedValue: 0)
     var index = input.startIndex
     for i in 1...(input.characters.count / 2) {
-        var str = String(input[index]) + String(input[index.successor()])
-        if let digit = UInt8(str, radix: 16) {
-            bytes[i-1] = digit
+        let str = String(input[index]) + String(input[index.successor()])
+        if let digit = Int(str, radix: 16) {
+            result[i-1] = digit
         } else {
             throw Parameter.InvalidHexString(str: str)
         }
         index = index.successor().successor()
     }
 
-    print (bytes)
-    return bytes
+    return result
 }
 
 //


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

    return (result == output)
}

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

//
// Exception types
