cvs: php4(PHP_4_0_7) /ext/mcrypt mcrypt.c

From: Date: Mon, 17 Dec 2001 20:23:38 +0000
Subject: cvs: php4(PHP_4_0_7) /ext/mcrypt mcrypt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8700@lists.php.net to get a copy of this message
derick Mon Dec 17 15:23:38 2001 EDT Modified files: (Branch: PHP_4_0_7) /php4/ext/mcrypt mcrypt.c Log: MFH backward compability issues with libmcrypt Index: php4/ext/mcrypt/mcrypt.c diff -u php4/ext/mcrypt/mcrypt.c:1.57.2.9 php4/ext/mcrypt/mcrypt.c:1.57.2.10 --- php4/ext/mcrypt/mcrypt.c:1.57.2.9 Sun Dec 16 14:06:20 2001 +++ php4/ext/mcrypt/mcrypt.c Mon Dec 17 15:23:38 2001 @@ -59,6 +59,9 @@ PHP_FE(mcrypt_generic, NULL) PHP_FE(mdecrypt_generic, NULL) PHP_FE(mcrypt_generic_end, NULL) +#if HAVE_MCRYPT_GENERIC_DEINIT + PHP_FE(mcrypt_generic_deinit, NULL) +#endif PHP_FE(mcrypt_enc_self_test, NULL) PHP_FE(mcrypt_enc_is_block_algorithm_mode, NULL) PHP_FE(mcrypt_enc_is_block_algorithm, NULL) @@ -673,13 +676,40 @@ MCRYPT_GET_TD_ARG +#if HAVE_MCRYPT_GENERIC_DEINIT + php_error(E_NOTICE, "mcrypt_generic_end is deprecated, please use mcrypt_generic_deinit"); + if (mcrypt_generic_deinit (td) < 0) { +#else if (mcrypt_generic_end (td) < 0) { +#endif php_error (E_WARNING, "could not terminate encryption specifier"); RETURN_FALSE } RETURN_TRUE } /* }}} */ + + +#if HAVE_MCRYPT_GENERIC_DEINIT + +/* {{{ proto bool mcrypt_generic_deinit(resource td) + This function terminates encrypt specified by the descriptor td */ +PHP_FUNCTION(mcrypt_generic_deinit) +{ + zval **mcryptind; + MCRYPT td; + + MCRYPT_GET_TD_ARG + + if (mcrypt_generic_deinit (td) < 0) { + php_error (E_WARNING, "could not terminate encryption specifier"); + RETURN_FALSE + } + RETURN_TRUE +} +/* }}} */ + +#endif /* {{{ proto bool mcrypt_enc_is_block_algorithm_mode(resource td)

« previous php.cvs (#8700) next »