Correctly handle binascii.Error.
Use for loop instead of map when not iterating.
Check for bytes rather than str.
Use bytes literals instead of string literals.