chiperlib.py: modified to encode/decode binary output by base64