I have a hex value that I\'m grabbing from a text file, then I\'m passing it to a2b_hex to convert it to the proper binary representation. Here is what I have:
I'm more interested what happens if you execute the following code:
with open("./" + basefile + ".key") as key_file:
key = key_file.read()
print len(key), key
Care to tell? There is probably some extra character you just don't see when printing. In these cases, make sure to print the length of the string.