forked from skeeto/enchive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
84 lines (65 loc) · 1.68 KB
/
config.h
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef CONFIG_H
#define CONFIG_H
/* Compile-time configuration */
#ifndef ENCHIVE_VERSION
# define ENCHIVE_VERSION 3.5
#endif
#ifndef ENCHIVE_FORMAT_VERSION
# define ENCHIVE_FORMAT_VERSION 3
#endif
#ifndef ENCHIVE_FILE_EXTENSION
# define ENCHIVE_FILE_EXTENSION .enchive
#endif
#ifndef ENCHIVE_KEY_DERIVE_ITERATIONS
# define ENCHIVE_KEY_DERIVE_ITERATIONS 25 /* 32MB */
#endif
#ifndef ENCHIVE_SECKEY_DERIVE_ITERATIONS
# define ENCHIVE_SECKEY_DERIVE_ITERATIONS 29 /* 512MB */
#endif
#ifndef ENCHIVE_OPTION_AGENT
# if defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__)
# define ENCHIVE_OPTION_AGENT 1
# else
# define ENCHIVE_OPTION_AGENT 0
# endif
#endif
#ifndef ENCHIVE_AGENT_TIMEOUT
# define ENCHIVE_AGENT_TIMEOUT 900 /* 15 minutes */
#endif
#ifndef ENCHIVE_AGENT_DEFAULT_ENABLED
# define ENCHIVE_AGENT_DEFAULT_ENABLED 0
#endif
#ifndef ENCHIVE_PINENTRY_DEFAULT
# define ENCHIVE_PINENTRY_DEFAULT pinentry
#endif
#ifndef ENCHIVE_PINENTRY_DEFAULT_ENABLED
# define ENCHIVE_PINENTRY_DEFAULT_ENABLED 0
#endif
#ifndef ENCHIVE_PASSPHRASE_MAX
# define ENCHIVE_PASSPHRASE_MAX 1024
#endif
/* Required for correct builds */
#ifndef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 1
#endif
#define OPTPARSE_IMPLEMENTATION
#define STR(a) XSTR(a)
#define XSTR(a) #a
/* Integer definitions needed by crypto */
#include <stdint.h>
/* If your compiler lacks a stdint.h, such as when compiling with a
* plain ANSI C compiler, you'll need to replace this include with the
* appropriate typedefs for the following types:
*
* uint8_t
* uint32_t
* uint64_t
* int32_t
* int64_t
*
* You will also need to define these macros:
*
* UINT8_C
* UINT32_C
*/
#endif /* CONFIG_H */