tony2001 Thu Jul 19 14:25:37 2007 UTC Modified files: /php-src/ext/mcrypt mcrypt.c Log: fix ws & folding http://cvs.php.net/viewvc.cgi/php-src/ext/mcrypt/mcrypt.c?r1=1.105&r2=1.106&diff_format=u Index: php-src/ext/mcrypt/mcrypt.c diff -u php-src/ext/mcrypt/mcrypt.c:1.105 php-src/ext/mcrypt/mcrypt.c:1.106 --- php-src/ext/mcrypt/mcrypt.c:1.105 Mon May 28 23:00:25 2007 +++ php-src/ext/mcrypt/mcrypt.c Thu Jul 19 14:25:37 2007 @@ -16,7 +16,7 @@ | Derick Rethans <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: mcrypt.c,v 1.105 2007/05/28 23:00:25 iliaa Exp $ */ +/* $Id: mcrypt.c,v 1.106 2007/07/19 14:25:37 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -44,7 +44,7 @@ zend_bool init; } php_mcrypt; -zend_function_entry mcrypt_functions[] = { +zend_function_entry mcrypt_functions[] = { /* {{{ */ PHP_FE(mcrypt_ecb, NULL) PHP_FE(mcrypt_cbc, NULL) PHP_FE(mcrypt_cfb, NULL) @@ -89,6 +89,7 @@ PHP_FE(mcrypt_module_close, NULL) {NULL, NULL, NULL} }; +/* }}} */ static PHP_MINFO_FUNCTION(mcrypt); static PHP_MINIT_FUNCTION(mcrypt); @@ -155,7 +156,7 @@ STD_PHP_INI_ENTRY("mcrypt.modes_dir", NULL, PHP_INI_ALL, OnUpdateString, modes_dir, zend_mcrypt_globals, mcrypt_globals) PHP_INI_END() -static void php_mcrypt_module_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) +static void php_mcrypt_module_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */ { php_mcrypt *pm = (php_mcrypt *) rsrc->ptr; if (pm) { @@ -165,9 +166,9 @@ rsrc->ptr = NULL; } } - +/* }}} */ -static PHP_MINIT_FUNCTION(mcrypt) +static PHP_MINIT_FUNCTION(mcrypt) /* {{{ */ { le_mcrypt = zend_register_list_destructors_ex(php_mcrypt_module_dtor, NULL, "mcrypt", module_number); @@ -222,16 +223,18 @@ REGISTER_INI_ENTRIES(); return SUCCESS; } +/* }}} */ -static PHP_MSHUTDOWN_FUNCTION(mcrypt) +static PHP_MSHUTDOWN_FUNCTION(mcrypt) /* {{{ */ { UNREGISTER_INI_ENTRIES(); return SUCCESS; } +/* }}} */ #include "ext/standard/php_smart_str.h" -PHP_MINFO_FUNCTION(mcrypt) +PHP_MINFO_FUNCTION(mcrypt) /* {{{ */ { char **modules; char mcrypt_api_no[16]; @@ -275,7 +278,7 @@ DISPLAY_INI_ENTRIES(); } - +/* }}} */ /* {{{ proto resource mcrypt_module_open(string cipher, string cipher_directory, string mode, string mode_directory) U Opens the module of the algorithm and the mode to be used */ @@ -315,7 +318,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_generic_init(resource td, binary key, binary iv) U This function initializes all buffers for the specific module */ PHP_FUNCTION(mcrypt_generic_init) @@ -372,7 +374,6 @@ } /* }}} */ - /* {{{ proto binary mcrypt_generic(resource td, binary data) U This function encrypts the plaintext */ PHP_FUNCTION(mcrypt_generic) @@ -412,7 +413,6 @@ } /* }}} */ - /* {{{ proto binary mdecrypt_generic(resource td, binary data) U This function decrypts the plaintext */ PHP_FUNCTION(mdecrypt_generic) @@ -451,7 +451,6 @@ } /* }}} */ - /* {{{ proto array mcrypt_enc_get_supported_key_sizes(resource td) U This function decrypts the crypttext */ PHP_FUNCTION(mcrypt_enc_get_supported_key_sizes) @@ -472,7 +471,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_enc_self_test(resource td) U This function runs the self test on the algorithm specified by the descriptor td */ PHP_FUNCTION(mcrypt_enc_self_test) @@ -492,7 +490,6 @@ } /* }}} */ - /* {{{ proto bool mcrypt_generic_deinit(resource td) U This function terminates encrypt specified by the descriptor td */ PHP_FUNCTION(mcrypt_generic_deinit) @@ -507,7 +504,6 @@ } /* }}} */ - /* {{{ proto bool mcrypt_enc_is_block_algorithm_mode(resource td) U Returns TRUE if the mode is for use with block algorithms */ PHP_FUNCTION(mcrypt_enc_is_block_algorithm_mode) @@ -522,7 +518,6 @@ } /* }}} */ - /* {{{ proto bool mcrypt_enc_is_block_algorithm(resource td) U Returns TRUE if the alrogithm is a block algorithms */ PHP_FUNCTION(mcrypt_enc_is_block_algorithm) @@ -537,7 +532,6 @@ } /* }}} */ - /* {{{ proto bool mcrypt_enc_is_block_mode(resource td) U Returns TRUE if the mode outputs blocks */ PHP_FUNCTION(mcrypt_enc_is_block_mode) @@ -552,7 +546,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_enc_get_block_size(resource td) U Returns the block size of the cipher specified by the descriptor td */ PHP_FUNCTION(mcrypt_enc_get_block_size) @@ -562,7 +555,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_enc_get_key_size(resource td) U Returns the maximum supported key size in bytes of the algorithm specified by the descriptor td */ PHP_FUNCTION(mcrypt_enc_get_key_size) @@ -572,7 +564,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_enc_get_iv_size(resource td) U Returns the size of the IV in bytes of the algorithm specified by the descriptor td */ PHP_FUNCTION(mcrypt_enc_get_iv_size) @@ -582,7 +573,6 @@ } /* }}} */ - /* {{{ proto string mcrypt_enc_get_algorithms_name(resource td) U Returns the name of the algorithm specified by the descriptor td */ PHP_FUNCTION(mcrypt_enc_get_algorithms_name) @@ -596,7 +586,6 @@ } /* }}} */ - /* {{{ proto string mcrypt_enc_get_modes_name(resource td) U Returns the name of the mode specified by the descriptor td */ PHP_FUNCTION(mcrypt_enc_get_modes_name) @@ -610,7 +599,6 @@ } /* }}} */ - /* {{{ proto bool mcrypt_module_self_test(string algorithm [, string lib_dir]) U Does a self test of the module "module" */ PHP_FUNCTION(mcrypt_module_self_test) @@ -625,7 +613,6 @@ } /* }}} */ - /* {{{ proto bool mcrypt_module_is_block_algorithm_mode(string mode [, string lib_dir]) U Returns TRUE if the mode is for use with block algorithms */ PHP_FUNCTION(mcrypt_module_is_block_algorithm_mode) @@ -640,7 +627,6 @@ } /* }}} */ - /* {{{ proto bool mcrypt_module_is_block_algorithm(string algorithm [, string lib_dir]) U Returns TRUE if the algorithm is a block algorithm */ PHP_FUNCTION(mcrypt_module_is_block_algorithm) @@ -655,7 +641,6 @@ } /* }}} */ - /* {{{ proto bool mcrypt_module_is_block_mode(string mode [, string lib_dir]) U Returns TRUE if the mode outputs blocks of bytes */ PHP_FUNCTION(mcrypt_module_is_block_mode) @@ -670,7 +655,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_module_get_algo_block_size(string algorithm [, string lib_dir]) U Returns the block size of the algorithm */ PHP_FUNCTION(mcrypt_module_get_algo_block_size) @@ -681,7 +665,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_module_get_algo_key_size(string algorithm [, string lib_dir]) U Returns the maximum supported key size of the algorithm */ PHP_FUNCTION(mcrypt_module_get_algo_key_size) @@ -692,7 +675,6 @@ } /* }}} */ - /* {{{ proto array mcrypt_module_get_supported_key_sizes(string algorithm [, string lib_dir]) U This function decrypts the crypttext */ PHP_FUNCTION(mcrypt_module_get_supported_key_sizes) @@ -712,7 +694,6 @@ } /* }}} */ - /* {{{ proto array mcrypt_list_algorithms([string lib_dir]) U List all algorithms in "module_dir" */ PHP_FUNCTION(mcrypt_list_algorithms) @@ -767,7 +748,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_get_key_size(string cipher, string module) U Get the key size of cipher */ PHP_FUNCTION(mcrypt_get_key_size) @@ -797,7 +777,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_get_block_size(string cipher, string module) U Get the key size of cipher */ PHP_FUNCTION(mcrypt_get_block_size) @@ -827,7 +806,6 @@ } /* }}} */ - /* {{{ proto int mcrypt_get_iv_size(string cipher, string module) U Get the IV size of cipher (Usually the same as the blocksize) */ PHP_FUNCTION(mcrypt_get_iv_size) @@ -857,7 +835,6 @@ } /* }}} */ - /* {{{ proto string mcrypt_get_cipher_name(string cipher) U Get the name of cipher */ PHP_FUNCTION(mcrypt_get_cipher_name) @@ -977,7 +954,6 @@ } /* }}} */ - /* {{{ proto binary mcrypt_create_iv(int size, int source) U Create an initialization vector (IV) */ PHP_FUNCTION(mcrypt_create_iv)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php