transfer to python3.
base codec api changed.
example:
b64encode api takes 8bit ascii byte in python3 instead of str in python2.

should transfer string using b"string" or str.encode("ascii") function.