added hex/base64 input/output support to cli tool