scottmac Mon May 4 16:37:32 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/hash hash.c Log: Add missing prototypes for mhash, no code changes. http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash.c?r1=1.18.2.5.2.7.2.17&r2=1.18.2.5.2.7.2.18&diff_format=u Index: php-src/ext/hash/hash.c diff -u php-src/ext/hash/hash.c:1.18.2.5.2.7.2.17 php-src/ext/hash/hash.c:1.18.2.5.2.7.2.18 --- php-src/ext/hash/hash.c:1.18.2.5.2.7.2.17 Wed Dec 31 11:15:37 2008 +++ php-src/ext/hash/hash.c Mon May 4 16:37:31 2009 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash.c,v 1.18.2.5.2.7.2.17 2008/12/31 11:15:37 sebastian Exp $ */ +/* $Id: hash.c,v 1.18.2.5.2.7.2.18 2009/05/04 16:37:31 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -527,7 +527,7 @@ } /* }}} */ -/* {{{ proto resource hash_copy(resource context) U +/* {{{ proto resource hash_copy(resource context) Copy hash resource */ PHP_FUNCTION(hash_copy) { @@ -647,6 +647,8 @@ zend_register_module_ex(&mhash_module_entry TSRMLS_CC); } +/* {{{ proto string mhash(int hash, string data [, string key]) + Hash data with hash */ PHP_FUNCTION(mhash) { zval **z_algorithm; @@ -660,7 +662,7 @@ convert_to_long_ex(z_algorithm); algorithm = Z_LVAL_PP(z_algorithm); - /* need to conver the first parameter from int to string */ + /* need to convert the first parameter from int constant to string algorithm name */ if (algorithm >= 0 && algorithm < MHASH_NUM_ALGOS) { struct mhash_bc_entry algorithm_lookup = mhash_to_hash[algorithm]; if (algorithm_lookup.hash_name) { @@ -676,7 +678,10 @@ WRONG_PARAM_COUNT; } } +/* }}} */ +/* {{{ proto string mhash_get_hash_name(int hash) + Gets the name of hash */ PHP_FUNCTION(mhash_get_hash_name) { long algorithm; @@ -693,7 +698,10 @@ } RETURN_FALSE; } +/* }}} */ +/* {{{ proto int mhash_count(void) + Gets the number of available hashes */ PHP_FUNCTION(mhash_count) { if (zend_parse_parameters_none() == FAILURE) { @@ -701,7 +709,10 @@ } RETURN_LONG(MHASH_NUM_ALGOS - 1); } +/* }}} */ +/* {{{ proto int mhash_get_block_size(int hash) + Gets the block size of hash */ PHP_FUNCTION(mhash_get_block_size) { long algorithm; @@ -721,9 +732,12 @@ } } } +/* }}} */ #define SALT_SIZE 8 +/* {{{ proto string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes) + Generates a key using hash functions */ PHP_FUNCTION(mhash_keygen_s2k) { long algorithm, bytes; @@ -789,6 +803,7 @@ } } } +/* }}} */ #endif
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php