summaryrefslogtreecommitdiff
path: root/ext/mcrypt
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-03-05 15:09:25 +0100
committerNikita Popov <nikic@php.net>2014-03-05 15:32:32 +0100
commiteb0eac75efaf76eb7772c6cd7768a581aeb6de8f (patch)
treede0e06d25ee9d435d6849f1d8b316b374cedd232 /ext/mcrypt
parente5738d3bc9aa2e8110e797ba987891708bc7e72e (diff)
downloadphp-git-eb0eac75efaf76eb7772c6cd7768a581aeb6de8f.tar.gz
Remove a number of macros that are no longer used
Diffstat (limited to 'ext/mcrypt')
-rw-r--r--ext/mcrypt/mcrypt.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 91be96ece9..ada3fb7143 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -310,48 +310,6 @@ zend_module_entry mcrypt_module_entry = {
ZEND_GET_MODULE(mcrypt)
#endif
-#define MCRYPT_ARGS2 \
- zval **cipher, **data, **key, **mode; \
- int td; \
- char *ndata; \
- size_t bsize; \
- size_t nr; \
- size_t nsize
-
-#define MCRYPT_ARGS \
- MCRYPT_ARGS2; \
- zval **iv
-
-#define MCRYPT_SIZE \
- bsize = mcrypt_get_block_size(Z_LVAL_PP(cipher)); \
- nr = (Z_STRLEN_PP(data) + bsize - 1) / bsize; \
- nsize = nr * bsize
-
-#define MCRYPT_CHECK_TD_CPY \
- if (td < 0) { \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, MCRYPT_FAILED); \
- RETURN_FALSE; \
- } \
- ndata = ecalloc(nr, bsize); \
- memcpy(ndata, Z_STRVAL_PP(data), Z_STRLEN_PP(data))
-
-#define MCRYPT_CHECK_IV \
- convert_to_string_ex(iv); \
- if (Z_STRLEN_PP(iv) != bsize) { \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, MCRYPT_IV_WRONG_SIZE); \
- RETURN_FALSE; \
- }
-
-#define MCRYPT_ACTION(x) \
- if (Z_LVAL_PP(mode) == 0) { \
- mcrypt_##x(td, ndata, nsize); \
- } else { \
- mdecrypt_##x(td, ndata, nsize); \
- } \
- end_mcrypt_##x(td)
-
-#define MCRYPT_IV_WRONG_SIZE "The IV parameter must be as long as the blocksize"
-
#define MCRYPT_ENCRYPT 0
#define MCRYPT_DECRYPT 1