git-svn-id: svn://db.shs.com.ru/pip@916 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2020-03-06 18:49:49 +00:00
parent 7f3cc7feb9
commit facf7bf707
2 changed files with 50 additions and 0 deletions

View File

@@ -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 <pass> string";
//piCout << "-t --text " << Green << "- output in text base64";
//piCout << "-o --out <out_file> " << Green << "- write out to file <out_file>";
//piCout << "-c --crypt <file> " << Green << "- crypt file <file> using secret <pass> or <hash> or <key_file>";
//piCout << "-d --decrypt <file> " << Green << "- decrypt file <file> using secret <pass> or <hash> or <key_file>";
//piCout << "-p --pass <pass> " << Green << "- use secret from passphrase <pass>";
//piCout << "-s --secret <hash> " << Green << "- use secret from hash <hash>";
//piCout << "-k --key <key_file> " << Green << "- use secret from binary key_file <key_file>";
//piCout << "-x --hex [<hex_key>] " << Green << "- use secret from hex hash <hex_key> 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;
}