diff --git a/utils/cloud_dispatcher/CMakeLists.txt b/utils/cloud_dispatcher/CMakeLists.txt new file mode 100644 index 00000000..74e17a22 --- /dev/null +++ b/utils/cloud_dispatcher/CMakeLists.txt @@ -0,0 +1,8 @@ +message(STATUS "Building picloud") +add_executable(picloud "main.cpp") +target_link_libraries(picloud pip pip_cloud) +if (DEFINED LIB) + install(TARGETS picloud DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +else() + install(TARGETS picloud DESTINATION bin) +endif() diff --git a/utils/cloud_dispatcher/main.cpp b/utils/cloud_dispatcher/main.cpp new file mode 100644 index 00000000..952bd592 --- /dev/null +++ b/utils/cloud_dispatcher/main.cpp @@ -0,0 +1,42 @@ +#include "pip.h" +#include "picrypt.h" + +using namespace PICoutManipulators; + + +void usage() { + piCout << Bold << "PIP Cloud dispatcher"; + piCout << Cyan << "Version" << Bold << PIPVersion() << NewLine; + piCout << Green << Bold << "Usage:" << Default << "\"picloud\"" << NewLine; + piCout << Green << Bold << "Details:"; + piCout << "-h --help " << Green << "- display this message and exit"; + //piCout << "-g --genhash " << Green << "- generate hash from string"; + //piCout << "-t --text " << Green << "- output in text base64"; + //piCout << "-o --out " << Green << "- write out to file "; + //piCout << "-c --crypt " << Green << "- crypt file using secret or or "; + //piCout << "-d --decrypt " << Green << "- decrypt file using secret or or "; + //piCout << "-p --pass " << Green << "- use secret from passphrase "; + //piCout << "-s --secret " << Green << "- use secret from hash "; + //piCout << "-k --key " << Green << "- use secret from binary key_file "; + //piCout << "-x --hex [] " << Green << "- use secret from hex hash or output in text hex"; + //piCout << "-r --random " << Green << "- generate random secret key"; +} + + +int main (int argc, char * argv[]) { + PICrypt::hash(""); + PICLI cli(argc, argv); + cli.addArgument("genhash", true); + + if (!(cli.hasArgument("genhash") || + cli.hasArgument("crypt") || + cli.hasArgument("decrypt") || + cli.hasArgument("random")) || + cli.hasArgument("help")) { + usage(); + return 0; + } + + return 0; +} +