2022-05-26 21:32:04 +02:00
|
|
|
#ifndef GCRYPTCLI_CONFIGURATION_H
|
|
|
|
#define GCRYPTCLI_CONFIGURATION_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class Configuration {
|
|
|
|
public:
|
|
|
|
static enum class INPUT_FROM {
|
|
|
|
STDIN,
|
|
|
|
FILE,
|
|
|
|
PARAMETER
|
|
|
|
} inputFrom;
|
|
|
|
|
|
|
|
static enum class OUTPUT_TO {
|
|
|
|
STDOUT,
|
|
|
|
FILE
|
|
|
|
} outputTo;
|
|
|
|
|
|
|
|
static enum class IOBASE_FORMAT {
|
|
|
|
BASE_BYTES,
|
|
|
|
BASE_2,
|
|
|
|
BASE_8,
|
|
|
|
BASE_10,
|
|
|
|
BASE_16,
|
|
|
|
BASE_64,
|
|
|
|
BASE_UWU,
|
|
|
|
BASE_UGH
|
|
|
|
} iobaseFormat;
|
|
|
|
|
|
|
|
static std::string inputFilename;
|
|
|
|
static std::string outputFilename;
|
|
|
|
|
|
|
|
static enum class MODULE {
|
|
|
|
ENCRYPT,
|
|
|
|
DECRYPT,
|
|
|
|
HASH,
|
2022-05-27 17:17:43 +02:00
|
|
|
GENERATE_KEY
|
2022-05-26 21:32:04 +02:00
|
|
|
} activeModule;
|
|
|
|
|
|
|
|
//! Will analyze the supplied cli parameters,
|
|
|
|
//! and decide what the configuration will be.
|
|
|
|
static void Parse();
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void DecideInputFrom();
|
|
|
|
static void DecideOutputTo();
|
|
|
|
static void DecideIOBaseFormat();
|
|
|
|
static void DecideModule();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|