enchive/config.h

78 lines
1.5 KiB
C
Raw Normal View History

#ifndef CONFIG_H
#define CONFIG_H
2017-03-05 19:40:24 +01:00
/* Compile-time configuration */
2017-03-06 03:02:00 +01:00
#ifndef ENCHIVE_VERSION
2017-07-21 18:12:37 +02:00
# define ENCHIVE_VERSION 3.3
2017-03-06 03:02:00 +01:00
#endif
#ifndef ENCHIVE_FORMAT_VERSION
2017-03-08 04:17:12 +01:00
# define ENCHIVE_FORMAT_VERSION 3
#endif
#ifndef ENCHIVE_KEY_DERIVE_ITERATIONS
2017-03-08 04:16:54 +01:00
# define ENCHIVE_KEY_DERIVE_ITERATIONS 25 /* 32MB */
#endif
#ifndef ENCHIVE_SECKEY_DERIVE_ITERATIONS
2017-03-08 04:16:54 +01:00
# define ENCHIVE_SECKEY_DERIVE_ITERATIONS 29 /* 512MB */
#endif
2017-03-05 21:51:38 +01:00
#ifndef ENCHIVE_OPTION_AGENT
# if defined(__unix__) || defined(__APPLE__)
# 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
2017-03-05 23:59:40 +01:00
#ifndef ENCHIVE_PASSPHRASE_MAX
# define ENCHIVE_PASSPHRASE_MAX 1024
#endif
2017-03-05 19:40:24 +01:00
/* Required for correct builds */
#ifndef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 1
#endif
2017-03-05 18:54:40 +01:00
#define OPTPARSE_IMPLEMENTATION
2017-03-05 19:40:24 +01:00
#define STR(a) XSTR(a)
#define XSTR(a) #a
/* Integer definitions needed by crypto */
2017-03-03 16:42:48 +01:00
#include <stdint.h>
#define U8C(v) (UINT8_C(v))
#define U16C(v) (UINT16_C(v))
#define U32C(v) (UINT32_C(v))
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
2017-03-03 17:22:36 +01:00
typedef uint64_t u64;
2017-03-03 16:42:48 +01:00
typedef int32_t s32;
typedef int64_t limb;
#endif /* CONFIG_H */