1 #ifndef CONFIG_H 2 #define CONFIG_H 3 4 /* Compile-time configuration */ 5 6 #ifndef ENCHIVE_VERSION 7 # define ENCHIVE_VERSION 3.5 8 #endif 9 10 #ifndef ENCHIVE_FORMAT_VERSION 11 # define ENCHIVE_FORMAT_VERSION 3 12 #endif 13 14 #ifndef ENCHIVE_FILE_EXTENSION 15 # define ENCHIVE_FILE_EXTENSION .enchive 16 #endif 17 18 #ifndef ENCHIVE_KEY_DERIVE_ITERATIONS 19 # define ENCHIVE_KEY_DERIVE_ITERATIONS 25 /* 32MB */ 20 #endif 21 22 #ifndef ENCHIVE_SECKEY_DERIVE_ITERATIONS 23 # define ENCHIVE_SECKEY_DERIVE_ITERATIONS 29 /* 512MB */ 24 #endif 25 26 #ifndef ENCHIVE_OPTION_AGENT 27 # if defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) 28 # define ENCHIVE_OPTION_AGENT 1 29 # else 30 # define ENCHIVE_OPTION_AGENT 0 31 # endif 32 #endif 33 34 #ifndef ENCHIVE_AGENT_TIMEOUT 35 # define ENCHIVE_AGENT_TIMEOUT 900 /* 15 minutes */ 36 #endif 37 38 #ifndef ENCHIVE_AGENT_DEFAULT_ENABLED 39 # define ENCHIVE_AGENT_DEFAULT_ENABLED 0 40 #endif 41 42 #ifndef ENCHIVE_PINENTRY_DEFAULT 43 # define ENCHIVE_PINENTRY_DEFAULT pinentry 44 #endif 45 46 #ifndef ENCHIVE_PINENTRY_DEFAULT_ENABLED 47 # define ENCHIVE_PINENTRY_DEFAULT_ENABLED 0 48 #endif 49 50 #ifndef ENCHIVE_PASSPHRASE_MAX 51 # define ENCHIVE_PASSPHRASE_MAX 1024 52 #endif 53 54 /* Required for correct builds */ 55 56 #ifndef _POSIX_C_SOURCE 57 # define _POSIX_C_SOURCE 1 58 #endif 59 60 #define OPTPARSE_IMPLEMENTATION 61 62 #define STR(a) XSTR(a) 63 #define XSTR(a) #a 64 65 /* Integer definitions needed by crypto */ 66 67 #include <stdint.h> 68 /* If your compiler lacks a stdint.h, such as when compiling with a 69 * plain ANSI C compiler, you'll need to replace this include with the 70 * appropriate typedefs for the following types: 71 * 72 * uint8_t 73 * uint32_t 74 * uint64_t 75 * int32_t 76 * int64_t 77 * 78 * You will also need to define these macros: 79 * 80 * UINT8_C 81 * UINT32_C 82 */ 83 84 #endif /* CONFIG_H */ 85