-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommandLineArg.hh
More file actions
69 lines (64 loc) · 2.64 KB
/
CommandLineArg.hh
File metadata and controls
69 lines (64 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* *
* 4crypt - Memory-Hard Symmetric File Encryption Program
* Copyright (C) 2025 Stuart Calder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef COMMANDLINEARG_HH
#define COMMANDLINEARG_HH
// Local
#include "Core.hh"
// SSC
#include <SSC/CommandLineArg.h>
#define ARGS_ const int argc, char** SSC_RESTRICT argv, const int offset, void* SSC_RESTRICT data
namespace fourcrypt {
struct ArgProc
{
// Set the number of KDF threads to process simultaneously.
static int batch_size(ARGS_);
// Set the mode to Decrypt, and provide the path to the encrypted file.
static int decrypt(ARGS_);
// Set the mode to Describe, and provide the path to the encrypted file.
static int describe(ARGS_);
// Set the mode to Encrypt, and provide the path to the plaintext file.
static int encrypt(ARGS_);
// Disable password re-entry during encryption; not applicable to decryption.
static int enter_password_once(ARGS_);
// Enable entering an 'entropy password' to harden the CSPRNG.
static int entropy(ARGS_);
// Print help output and exit successfully.
static int help(ARGS_);
// Set the higher memory bound for the KDF.
static int high_mem(ARGS_);
// Set the number of KDF iterations per thread.
static int iterations(ARGS_);
// Set the lower memory bound for the KDF.
static int low_mem(ARGS_);
// Set the output file path.
static int output(ARGS_);
// Pad the output ciphertext as if it was an unpadded ciphertext of the provided size, rounded up to be divisible by 64.
static int pad_as_if(ARGS_);
// Pad the output ciphertext by the provided number of bytes, round up to be divisible by 64.
static int pad_by(ARGS_);
// Pad the output ciphertext up to the provided target size in bytes, rounded up to be divisible by 64.
static int pad_to(ARGS_);
// Set the number of KDF threads.
static int threads(ARGS_);
// Set the low and high KDF memory bounds to the same provided value.
static int use_mem(ARGS_);
// Enable usage of the Phi function in the KDF.
static int use_phi(ARGS_);
};
} // ! namespace fourcrypt
#undef ARGS_
#endif