-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathCipherSettings.h
More file actions
50 lines (37 loc) · 1.34 KB
/
CipherSettings.h
File metadata and controls
50 lines (37 loc) · 1.34 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
#ifndef CIPHERSETTINGS_H
#define CIPHERSETTINGS_H
#include <string>
class CipherSettings
{
public:
CipherSettings();
enum KeyFormats
{
Passphrase,
RawKey
};
KeyFormats getKeyFormat() const { return keyFormat; }
void setKeyFormat(const KeyFormats &value) { keyFormat = value; }
std::string getPassword() const;
void setPassword(const std::string& value) { password = value; }
int getPageSize() const { return pageSize; }
void setPageSize(int value) { pageSize = value; }
int getKdfIterations() const { return kdfIterations; }
void setKdfIterations(int value) { kdfIterations = value; }
int getPlaintextHeaderSize() const { return plaintextHeaderSize; }
void setPlaintextHeaderSize(int value) { plaintextHeaderSize = value; }
std::string getHmacAlgorithm() const { return hmacAlgorithm; }
void setHmacAlgorithm(const std::string& value) { hmacAlgorithm = value; }
std::string getKdfAlgorithm() const { return kdfAlgorithm; }
void setKdfAlgorithm(const std::string& value) { kdfAlgorithm = value; }
static KeyFormats getKeyFormat(int rawKeyFormat);
private:
KeyFormats keyFormat;
std::string password;
int pageSize;
int kdfIterations;
int plaintextHeaderSize;
std::string hmacAlgorithm;
std::string kdfAlgorithm;
};
#endif // CIPHERSETTINGS_H