Add ENCHIVE_FILE_EXTENSION compile-time option (#9)

pull/10/head
Christopher Wellons 2018-01-06 14:01:13 -05:00
parent 50cc1748f5
commit d09debe64c
3 changed files with 10 additions and 1 deletions

View File

@ -266,6 +266,11 @@ The default program to use for `pinentry`.
Whether or not to use `pinentry` by default when reading passphrases.
#### `ENCHIVE_FILE_EXTENSION`
The file extension to add when archiving and remove when extracting. The
default is `.enchive`, as it appears in the examples.
#### `ENCHIVE_KEY_DERIVE_ITERATIONS`
Power-of-two exponent for protection key derivation. Can be configured

View File

@ -11,6 +11,10 @@
# 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

View File

@ -28,7 +28,7 @@ static char *pinentry_path = STR(ENCHIVE_PINENTRY_DEFAULT);
static char *pinentry_path = 0;
#endif
static const char enchive_suffix[] = ".enchive";
static const char enchive_suffix[] = STR(ENCHIVE_FILE_EXTENSION);
static struct {
char *name;