8 using namespace std::string_literals;
48 CREATE TABLE IF NOT EXISTS Encryptions
50 ide INTEGER PRIMARY KEY AUTOINCREMENT,
51 algo INTEGER NOT NULL, -- algorithm enum id used in encryption. e.g: AES=1 ..
52 title VARCHAR(255) NOT NULL,
53 date_time DATETIME NOT NULL,
54 size INTEGER NOT NULL, -- size of compressed cipher in bytes
55 is_file BOOLEAN NOT NULL,
56 file_ext VARCHAR(9), -- file extension to remember file type on decryption
58 CHECK(LENGTH(title) <= 255) -- check title length <= 255
63 CREATE TABLE IF NOT EXISTS CipherChunks
65 idc INTEGER PRIMARY KEY AUTOINCREMENT,
67 offset INTEGER NOT NULL,
68 size INTEGER NOT NULL,
71 FOREIGN KEY(ide) REFERENCES Encryptions(ide) ON DELETE CASCADE -- when an Encryption record is deleted, all associated Cipher records will also be deleted automatically.
79 #if TRANSLATION_ENABLED
80 namespace Translation {
81 static const fs::path TRANSLATION_DIR =
"Translation";
82 static const fs::path TRANSLATION_CURRENT_FILE_PATH = fs::path(TRANSLATION_DIR) /
".current";
83 static const fs::path TRANSLATION_ENGLISH_PATH = fs::path(TRANSLATION_DIR) /
"English.ini";
88 static constexpr
const char *
CLI_HELP_MESSAGE =
"Say -h or --help to display available options";
92 static const auto ENIGMA_GITHUB_REPOSITORY =
"https://github.com/baderouaich/Enigma"s;
93 static const auto ENIGMA_GITHUB_REPOSITORY_ISSUES = ENIGMA_GITHUB_REPOSITORY +
"/issues"s;
94 static const auto ENIGMA_GITHUB_REPOSITORY_PULL_REQUESTS = ENIGMA_GITHUB_REPOSITORY +
"/pulls"s;
95 static const auto ENIGMA_GITHUB_API =
"https://api.github.com/repos/baderouaich/Enigma"s;
96 static const auto ENIGMA_GITHUB_API_LATEST_RELEASE = ENIGMA_GITHUB_API +
"/releases/latest"s;
113 static constexpr
const auto COLOR4I_TO_COLOR4F = [](
const float r,
const float g,
const float b,
const float a) -> ImVec4 {
114 return ImVec4{r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f};
117 static const ImVec4
RED(1.0f, 0.0f, 0.0f, 1.0f);
118 static const ImVec4
GREEN(0.0f, 1.0f, 0.0f, 1.0f);
119 static const ImVec4
BLUE(0.0f, 0.0f, 1.0f, 1.0f);
Algorithm abstract class.
static fs::path getResourcesDir()
Returns path to res/ folder Example: /home//Enigma/res/.
static constexpr const char * CLI_HELP_MESSAGE
static constexpr const std::array< std::string_view, 2 > CREATE_TABLES_SQL
static const fs::path DATABASE_FILE_PATH
static constexpr const char * SPECIAL_CHARACTERS
static constexpr const std::size_t MINIMUM_PASSWORD_LENGTH
static const ImVec4 BACK_BUTTON_COLOR_ACTIVE
static const ImVec4 PASSWORD_MATCH_TEXT_COLOR
static const ImVec4 LOADING_BACKGROUND_COLOR
static const ImVec4 BACK_BUTTON_COLOR_HOVER
static const ImVec4 GREEN(0.0f, 1.0f, 0.0f, 1.0f)
static const ImVec4 MY_ENCRYPTIONS_BUTTON_COLOR
static const ImVec4 BUTTON_COLOR_ACTIVE
static const ImVec4 BACKGROUND_COLOR
static const ImVec4 MENUBAR_BACKGROUND_COLOR
static const ImVec4 MY_ENCRYPTIONS_BUTTON_COLOR_HOVER
static const ImVec4 TOOLS_BUTTON_COLOR_ACTIVE
static constexpr const auto COLOR4I_TO_COLOR4F
static const ImVec4 LOADING_SPINNER_COLOR
static const ImVec4 TOOLS_BUTTON_COLOR_HOVER
static const ImVec4 BACK_BUTTON_COLOR
static const ImVec4 & SCENE_TITLE_BACKGROUND_COLOR
static const ImVec4 TEXT_COLOR
static const ImVec4 BLUE(0.0f, 0.0f, 1.0f, 1.0f)
static const ImVec4 ERROR_TEXT_COLOR
static const ImVec4 BUTTON_COLOR_HOVER
static const ImVec4 TOOLS_BUTTON_COLOR
static const ImVec4 RED(1.0f, 0.0f, 0.0f, 1.0f)
static const ImVec4 MY_ENCRYPTIONS_BUTTON_COLOR_ACTIVE
static const ImVec4 BUTTON_COLOR
static constexpr const std::uint16_t ENIGMA_SINGLE_PROCESS_UNIQUE_PORT