1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef PHP_MCRYPT_H
22 #define PHP_MCRYPT_H
23
24 #if HAVE_LIBMCRYPT
25
26 #ifdef ZTS
27 #include "TSRM.h"
28 #endif
29
30 extern zend_module_entry mcrypt_module_entry;
31 #define mcrypt_module_ptr &mcrypt_module_entry
32
33 #include "php_version.h"
34 #define PHP_MCRYPT_VERSION PHP_VERSION
35
36
37 PHP_FUNCTION(mcrypt_ecb);
38 PHP_FUNCTION(mcrypt_cbc);
39 PHP_FUNCTION(mcrypt_cfb);
40 PHP_FUNCTION(mcrypt_ofb);
41 PHP_FUNCTION(mcrypt_get_cipher_name);
42 PHP_FUNCTION(mcrypt_get_block_size);
43 PHP_FUNCTION(mcrypt_get_key_size);
44 PHP_FUNCTION(mcrypt_create_iv);
45
46
47 PHP_FUNCTION(mcrypt_list_algorithms);
48 PHP_FUNCTION(mcrypt_list_modes);
49 PHP_FUNCTION(mcrypt_get_iv_size);
50 PHP_FUNCTION(mcrypt_encrypt);
51 PHP_FUNCTION(mcrypt_decrypt);
52
53
54 PHP_FUNCTION(mcrypt_module_open);
55 PHP_FUNCTION(mcrypt_generic_init);
56 PHP_FUNCTION(mcrypt_generic);
57 PHP_FUNCTION(mdecrypt_generic);
58 PHP_FUNCTION(mcrypt_generic_deinit);
59
60 PHP_FUNCTION(mcrypt_enc_self_test);
61 PHP_FUNCTION(mcrypt_enc_is_block_algorithm_mode);
62 PHP_FUNCTION(mcrypt_enc_is_block_algorithm);
63 PHP_FUNCTION(mcrypt_enc_is_block_mode);
64 PHP_FUNCTION(mcrypt_enc_get_block_size);
65 PHP_FUNCTION(mcrypt_enc_get_key_size);
66 PHP_FUNCTION(mcrypt_enc_get_supported_key_sizes);
67 PHP_FUNCTION(mcrypt_enc_get_iv_size);
68 PHP_FUNCTION(mcrypt_enc_get_algorithms_name);
69 PHP_FUNCTION(mcrypt_enc_get_modes_name);
70 PHP_FUNCTION(mcrypt_module_self_test);
71 PHP_FUNCTION(mcrypt_module_is_block_algorithm_mode);
72 PHP_FUNCTION(mcrypt_module_is_block_algorithm);
73 PHP_FUNCTION(mcrypt_module_is_block_mode);
74 PHP_FUNCTION(mcrypt_module_get_algo_block_size);
75 PHP_FUNCTION(mcrypt_module_get_algo_key_size);
76 PHP_FUNCTION(mcrypt_module_get_supported_key_sizes);
77 PHP_FUNCTION(mcrypt_module_close);
78
79 ZEND_BEGIN_MODULE_GLOBALS(mcrypt)
80 int le_h;
81 char *modes_dir;
82 char *algorithms_dir;
83 int fd[2];
84 ZEND_END_MODULE_GLOBALS(mcrypt)
85
86 #define MCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(mcrypt, v)
87
88 #else
89 #define mcrypt_module_ptr NULL
90 #endif
91
92 #define phpext_mcrypt_ptr mcrypt_module_ptr
93
94 #endif