using binascii instead of base64 codec