d787f7a6fe5a6841ab4531c9f91101b0de9f11ce
[platform/upstream/cryptsetup.git] / src / cryptsetup.h
1 #ifndef CRYPTSETUP_H
2 #define CRYPTSETUP_H
3
4 #ifdef HAVE_CONFIG_H
5 #       include <config.h>
6 #endif
7
8 #if HAVE_LOCALE_H
9 #       include <locale.h>
10 #endif
11 #if !HAVE_SETLOCALE
12 #       define setlocale(Category, Locale)      do { } while (0)
13 #endif
14
15 #ifdef ENABLE_NLS
16 #       include <libintl.h>
17 #       define _(Text) gettext (Text)
18 #else
19 #       undef bindtextdomain
20 #       define bindtextdomain(Domain, Directory)        do { } while (0)
21 #       undef textdomain
22 #       define textdomain(Domain)       do { } while (0)
23 #       undef dcgettext
24 #       define dcgettext(Domainname, Text, Category) Text
25 #       define _(Text) Text
26 #endif
27 #define N_(Text) (Text)
28
29 #define DEFAULT_CIPHER          "aes"
30 #define DEFAULT_LUKS_CIPHER     "aes-cbc-essiv:sha256"
31 #define DEFAULT_HASH            "ripemd160"
32 #define DEFAULT_LUKS_HASH       "sha1"
33 #define DEFAULT_KEY_SIZE        256
34 #define DEFAULT_LUKS_KEY_SIZE   128
35
36 #define MAX_CIPHER_LEN          32
37 #define MAX_CIPHER_LEN_STR      "32"
38
39 #define log_dbg(x...) clogger(NULL, CRYPT_LOG_DEBUG, __FILE__, __LINE__, x)
40 #define log_std(x...) clogger(NULL, CRYPT_LOG_NORMAL, __FILE__, __LINE__, x)
41 #define log_err(x...) clogger(NULL, CRYPT_LOG_ERROR, __FILE__, __LINE__, x)
42
43 #endif /* CRYPTSETUP_H */