summaryrefslogtreecommitdiff
path: root/ext/mcrypt/php_mcrypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mcrypt/php_mcrypt.h')
-rw-r--r--ext/mcrypt/php_mcrypt.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/mcrypt/php_mcrypt.h b/ext/mcrypt/php_mcrypt.h
index 871e96f6e5..3dafc9b490 100644
--- a/ext/mcrypt/php_mcrypt.h
+++ b/ext/mcrypt/php_mcrypt.h
@@ -30,6 +30,20 @@
extern zend_module_entry mcrypt_module_entry;
#define mcrypt_module_ptr &mcrypt_module_entry
+typedef enum {
+ PHP_MCRYPT_IV_SOURCE_RANDOM = 0,
+ PHP_MCRYPT_IV_SOURCE_URANDOM,
+ PHP_MCRYPT_IV_SOURCE_RAND
+} php_mcrypt_iv_source;
+
+typedef enum {
+ PHP_MCRYPT_ENCRYPT = 0,
+ PHP_MCRYPT_DECRYPT = 1,
+} php_mcrypt_op;
+
+int php_mcrypt_iv(php_mcrypt_iv_source source, int size, char **iv_str, int *iv_len TSRMLS_DC);
+int php_mcrypt_func(php_mcrypt_op op, char *cipher, char *mode, char *key_str, int key_len, char *iv_str, int iv_len, char *data_str, int data_len, char **data_copy, int *data_size TSRMLS_DC);
+
/* Functions for both old and new API */
PHP_FUNCTION(mcrypt_ecb);
PHP_FUNCTION(mcrypt_cbc);