/* base64.cc - c++ source to a base64 reference encoder and decoder This is part of the libb64 project, and has been placed in the public domain. For details, see http://sourceforge.net/projects/libb64 */ #include #include #include #include #include #include // Function which prints the usage of this executable void usage() { std::cerr<< \ "base64: Encodes and Decodes files using base64\n" \ "Usage: base64 [-e|-d] [input] [output]\n" \ " Where [-e] will encode the input file into the output file,\n" \ " [-d] will decode the input file into the output file, and\n" \ " [input] and [output] are the input and output files, respectively.\n"; } // Function which prints the usage of this executable, plus a short message void usage(const std::string& message) { usage(); std::cerr<<"Incorrect invocation of base64:\n"; std::cerr<