diff options
author | Pierre Joye <pajoye@php.net> | 2008-07-03 13:50:14 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2008-07-03 13:50:14 +0000 |
commit | f0ec9b9475ab8b7533feb4915b1dd0d49997086f (patch) | |
tree | 2d34ce4b3fb6b8ff8843bb6b11d16b9ac5880662 /ext/mcrypt/php_mcrypt.h | |
parent | 12a4c54dcf3bb9003614dc7496a4f7e929b851b3 (diff) | |
download | php-git-f0ec9b9475ab8b7533feb4915b1dd0d49997086f.tar.gz |
- fix mcrypt_iv on windows, use urandom equivalent
- MFH, code cleaning and reorganisation
Diffstat (limited to 'ext/mcrypt/php_mcrypt.h')
-rw-r--r-- | ext/mcrypt/php_mcrypt.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/mcrypt/php_mcrypt.h b/ext/mcrypt/php_mcrypt.h index 32fff82165..6642d580f5 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); |