/[mcrypt]/libmcrypt/lib/mcrypt_internal.h
ViewVC logotype

Contents of /libmcrypt/lib/mcrypt_internal.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations)
Fri May 18 07:08:03 2001 UTC (22 years, 10 months ago) by nmav
Branch: MAIN
CVS Tags: libmcrypt_2_4_15, mcrypt_2_4_13
Changes since 1.6: +5 -0 lines
File MIME type: text/plain
updated behaviour when an older libltdl is found in the system

1
2 /* Local Defines */
3
4 #ifndef lt_ptr
5 /* older version of libltdl */
6 # define lt_ptr lt_ptr_t
7 #endif
8
9 typedef struct {
10 lt_dlhandle algorithm_handle;
11 lt_dlhandle mode_handle;
12
13 /* Holds the algorithm's internal key */
14 byte *akey;
15
16 byte *abuf; /* holds the mode's internal buffers */
17
18 /* holds the key */
19 byte *keyword_given;
20
21 /* These were included to speed up encryption/decryption proccess, so
22 * there is not need for resolving symbols every time.
23 */
24 lt_ptr m_encrypt;
25 lt_ptr m_decrypt;
26 lt_ptr a_encrypt;
27 lt_ptr a_decrypt;
28 lt_ptr a_block_size;
29 } CRYPT_STREAM;
30
31 typedef CRYPT_STREAM* MCRYPT;
32
33 #define MCRYPT_FAILED 0x0
34
35 int mcrypt_module_close(MCRYPT td);
36
37 /* frontends */
38
39 int end_mcrypt( MCRYPT td, void *buf);
40 int mcrypt_enc_get_size(MCRYPT td);
41 int mcrypt_mode_get_size(MCRYPT td);
42 int mcrypt_set_key(MCRYPT td, void *a, void *b, int c, void *d, int e);
43 int mcrypt_enc_get_block_size(MCRYPT td);
44 int __mcrypt_get_block_size(MCRYPT td);
45 int mcrypt_enc_get_algo_iv_size(MCRYPT td);
46 int mcrypt_enc_get_iv_size(MCRYPT td);
47 int mcrypt_enc_get_key_size(MCRYPT td);
48 int* mcrypt_enc_get_supported_key_sizes(MCRYPT td, int* out_size);
49 int mcrypt_enc_is_block_algorithm(MCRYPT td);
50 char *mcrypt_enc_get_algorithms_name(MCRYPT td);
51 int init_mcrypt(MCRYPT td, void*buf, void *a, int b, void *c);
52 int mcrypt(MCRYPT td, void* buf, void *a, int b);
53 int mdecrypt(MCRYPT td, void* buf, void *a, int b);
54 char *mcrypt_enc_get_modes_name(MCRYPT td);
55 int mcrypt_enc_is_block_mode(MCRYPT td);
56 int mcrypt_enc_mode_has_iv(MCRYPT td);
57 int mcrypt_enc_is_block_algorithm_mode(MCRYPT td);
58 int mcrypt_module_algorithm_version(char *algorithm, char *a_directory);
59 int mcrypt_module_mode_version(char *mode, char *m_directory);
60 int mcrypt_get_size(MCRYPT td);
61 int *mcrypt_enc_get_supported_key_sizes(MCRYPT td, int *len);
62
63
64 #define MCRYPT_UNKNOWN_ERROR -1
65 #define MCRYPT_ALGORITHM_MODE_INCOMPATIBILITY -2
66 #define MCRYPT_KEY_LEN_ERROR -3
67 #define MCRYPT_MEMORY_ALLOCATION_ERROR -4
68 #define MCRYPT_UNKNOWN_MODE -5
69 #define MCRYPT_UNKNOWN_ALGORITHM -6
70

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26