GCrypt/GCryptCLI/include/Configuration.h

62 lines
1.2 KiB
C
Raw Permalink Normal View History

#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
2022-05-31 17:44:30 +02:00
}
formatIn,
formatOut;
static std::string inputFilename;
static std::string outputFilename;
static enum class MODULE {
ENCRYPTION,
DECRYPTION,
HASH,
GENERATE_KEY
} activeModule;
//! Will analyze the supplied cli parameters,
//! and decide what the configuration will be.
static void Parse();
private:
static void DecideInputFrom();
static void DecideOutputTo();
2022-05-31 17:44:30 +02:00
static void DecideCiphertextFormat();
static void MapCiphertextFormatToIOBases();
static void DecideModule();
2022-05-31 14:28:17 +02:00
2022-05-31 17:44:30 +02:00
// This is just an intermediary value, used between methods
static IOBASE_FORMAT ciphertextFormat;
2022-05-31 14:28:17 +02:00
// No instanciation! >:(
Configuration() {};
};
#endif