* Move memory locking and dm initialization to command layer.
[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 /* Helper funcions provided by internal libcryptsetup objects */
37 struct crypt_device;
38 extern int memlock_inc(struct crypt_device *ctx);
39 extern int memlock_dec(struct crypt_device *ctx);
40 extern int dm_init(struct crypt_device *context, int check_kernel);
41 extern void dm_exit(void);
42
43 #endif /* CRYPTSETUP_H */