tony2001                Mon Apr 21 15:37:07 2008 UTC

  Added files:                 
    /php-src/ext/hash/tests     hash_copy_001.phpt hash_copy_002.phpt 

  Modified files:              
    /php-src/ext/hash   hash_adler32.c hash.c hash_crc32.c hash_gost.c 
                        hash_haval.c hash_md.c hash_ripemd.c hash_salsa.c 
                        hash_sha.c hash_snefru.c hash_tiger.c 
                        hash_whirlpool.c php_hash_adler32.h 
                        php_hash_crc32.h php_hash.h 
  Log:
  [DOC] add hash_copy() to be able to copy hash resource
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_adler32.c?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/hash/hash_adler32.c
diff -u php-src/ext/hash/hash_adler32.c:1.8 php-src/ext/hash/hash_adler32.c:1.9
--- php-src/ext/hash/hash_adler32.c:1.8 Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_adler32.c     Mon Apr 21 15:37:07 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_adler32.c,v 1.8 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_adler32.c,v 1.9 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_adler32.h"
@@ -49,10 +49,17 @@
        context->state = 0;
 }
 
+PHP_HASH_API int PHP_ADLER32Copy(const php_hash_ops *ops, PHP_ADLER32_CTX 
*orig_context, PHP_ADLER32_CTX *copy_context)
+{
+       copy_context->state = orig_context->state;
+       return SUCCESS;
+}
+
 const php_hash_ops php_hash_adler32_ops = {
        (php_hash_init_func_t) PHP_ADLER32Init,
        (php_hash_update_func_t) PHP_ADLER32Update,
        (php_hash_final_func_t) PHP_ADLER32Final,
+       (php_hash_copy_func_t) PHP_ADLER32Copy,
        4, /* what to say here? */
        4,
        sizeof(PHP_ADLER32_CTX)
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash.c?r1=1.40&r2=1.41&diff_format=u
Index: php-src/ext/hash/hash.c
diff -u php-src/ext/hash/hash.c:1.40 php-src/ext/hash/hash.c:1.41
--- php-src/ext/hash/hash.c:1.40        Fri Apr  4 07:47:18 2008
+++ php-src/ext/hash/hash.c     Mon Apr 21 15:37:07 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash.c,v 1.40 2008/04/04 07:47:18 tony2001 Exp $ */
+/* $Id: hash.c,v 1.41 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -63,6 +63,15 @@
 }
 /* }}} */
 
+PHP_HASH_API int php_hash_copy(const void *ops, void *orig_context, void 
*dest_context) /* {{{ */
+{
+       php_hash_ops *hash_ops = (php_hash_ops *)ops;
+
+       memcpy(dest_context, orig_context, hash_ops->context_size);
+       return SUCCESS;
+}
+/* }}} */
+
 /* Userspace */
 
 static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename) /* 
{{{ */
@@ -378,7 +387,7 @@
        }
 
 #if PHP_MAJOR_VERSION >= 6
-       if (key_type == IS_UNICODE) {
+       if (key && key_type == IS_UNICODE) {
                key = zend_unicode_to_ascii((UChar*)key, key_len TSRMLS_CC);
                if (!key) {
                        /* Non-ASCII Unicode key passed for raw hashing */
@@ -422,7 +431,7 @@
        }
 
 #if PHP_MAJOR_VERSION >= 6
-       if (key_type == IS_UNICODE) {
+       if (key && key_type == IS_UNICODE) {
                efree(key);
        }
 #endif
@@ -638,6 +647,41 @@
 }
 /* }}} */
 
+/* {{{ proto resource hash_copy(resource context) U
+Copy hash resource */
+PHP_FUNCTION(hash_copy)
+{
+       zval *zhash;
+       php_hash_data *hash, *copy_hash;
+       void *context;
+       int res;
+
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zhash) == 
FAILURE) {
+               return;
+       }
+
+       ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME, 
php_hash_le_hash);
+
+
+       context = emalloc(hash->ops->context_size);
+       hash->ops->hash_init(context);
+
+       res = hash->ops->hash_copy(hash->ops, hash->context, context);
+       if (res != SUCCESS) {
+               efree(context);
+               RETURN_FALSE;
+       }
+
+       copy_hash = emalloc(sizeof(php_hash_data));
+       copy_hash->ops = hash->ops;
+       copy_hash->context = context;
+       copy_hash->options = hash->options;
+       copy_hash->key = hash->key;
+       
+       ZEND_REGISTER_RESOURCE(return_value, copy_hash, php_hash_le_hash);
+}
+/* }}} */
+
 /* {{{ proto array hash_algos(void) U
 Return a list of registered hashing algorithms */
 PHP_FUNCTION(hash_algos)
@@ -854,6 +898,11 @@
 ZEND_END_ARG_INFO()
 
 static
+ZEND_BEGIN_ARG_INFO(arginfo_hash_copy, 0)
+       ZEND_ARG_INFO(0, context)
+ZEND_END_ARG_INFO()
+
+static
 ZEND_BEGIN_ARG_INFO(arginfo_hash_algos, 0)
 ZEND_END_ARG_INFO()
 
@@ -877,6 +926,7 @@
        PHP_HASH_FE(hash_update_stream)
        PHP_HASH_FE(hash_update_file)
        PHP_HASH_FE(hash_final)
+       PHP_HASH_FE(hash_copy)
 
        PHP_HASH_FE(hash_algos)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_crc32.c?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/hash/hash_crc32.c
diff -u php-src/ext/hash/hash_crc32.c:1.6 php-src/ext/hash/hash_crc32.c:1.7
--- php-src/ext/hash/hash_crc32.c:1.6   Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_crc32.c       Mon Apr 21 15:37:07 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_crc32.c,v 1.6 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_crc32.c,v 1.7 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_crc32.h"
@@ -56,10 +56,17 @@
        context->state = 0;
 }
 
+PHP_HASH_API int PHP_CRC32Copy(const php_hash_ops *ops, PHP_CRC32_CTX 
*orig_context, PHP_CRC32_CTX *copy_context)
+{
+       copy_context->state = orig_context->state;
+       return SUCCESS;
+}
+
 const php_hash_ops php_hash_crc32_ops = {
        (php_hash_init_func_t) PHP_CRC32Init,
        (php_hash_update_func_t) PHP_CRC32Update,
        (php_hash_final_func_t) PHP_CRC32Final,
+       (php_hash_copy_func_t) PHP_CRC32Copy,
        4, /* what to say here? */
        4,
        sizeof(PHP_CRC32_CTX)
@@ -69,6 +76,7 @@
        (php_hash_init_func_t) PHP_CRC32Init,
        (php_hash_update_func_t) PHP_CRC32BUpdate,
        (php_hash_final_func_t) PHP_CRC32Final,
+       (php_hash_copy_func_t) PHP_CRC32Copy,
        4, /* what to say here? */
        4,
        sizeof(PHP_CRC32_CTX)
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_gost.c?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/hash/hash_gost.c
diff -u php-src/ext/hash/hash_gost.c:1.6 php-src/ext/hash/hash_gost.c:1.7
--- php-src/ext/hash/hash_gost.c:1.6    Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_gost.c        Mon Apr 21 15:37:07 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_gost.c,v 1.6 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_gost.c,v 1.7 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_gost.h"
@@ -306,6 +306,7 @@
        (php_hash_init_func_t) PHP_GOSTInit,
        (php_hash_update_func_t) PHP_GOSTUpdate,
        (php_hash_final_func_t) PHP_GOSTFinal,
+       (php_hash_copy_func_t) php_hash_copy,
        32,
        32,
        sizeof(PHP_GOST_CTX)
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_haval.c?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/hash/hash_haval.c
diff -u php-src/ext/hash/hash_haval.c:1.8 php-src/ext/hash/hash_haval.c:1.9
--- php-src/ext/hash/hash_haval.c:1.8   Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_haval.c       Mon Apr 21 15:37:07 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_haval.c,v 1.8 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_haval.c,v 1.9 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_haval.h"
@@ -254,6 +254,7 @@
        (php_hash_init_func_t) PHP_##p##HAVAL##b##Init, \
        (php_hash_update_func_t) PHP_HAVALUpdate, \
        (php_hash_final_func_t) PHP_HAVAL##b##Final, \
+       (php_hash_copy_func_t) php_hash_copy, \
        ((b) / 8), 128, sizeof(PHP_HAVAL_CTX) }; \
 PHP_HASH_API void PHP_##p##HAVAL##b##Init(PHP_HAVAL_CTX *context) \
 {      int i; context->count[0] =      context->count[1] =     0; \
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_md.c?r1=1.15&r2=1.16&diff_format=u
Index: php-src/ext/hash/hash_md.c
diff -u php-src/ext/hash/hash_md.c:1.15 php-src/ext/hash/hash_md.c:1.16
--- php-src/ext/hash/hash_md.c:1.15     Fri Feb  8 09:11:28 2008
+++ php-src/ext/hash/hash_md.c  Mon Apr 21 15:37:07 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_md.c,v 1.15 2008/02/08 09:11:28 dmitry Exp $ */
+/* $Id: hash_md.c,v 1.16 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_md.h"
@@ -25,6 +25,7 @@
        (php_hash_init_func_t) PHP_MD5Init,
        (php_hash_update_func_t) PHP_MD5Update,
        (php_hash_final_func_t) PHP_MD5Final,
+       (php_hash_copy_func_t) php_hash_copy,
        16,
        64,
        sizeof(PHP_MD5_CTX)
@@ -34,6 +35,7 @@
        (php_hash_init_func_t) PHP_MD4Init,
        (php_hash_update_func_t) PHP_MD4Update,
        (php_hash_final_func_t) PHP_MD4Final,
+       (php_hash_copy_func_t) php_hash_copy,
        16,
        64,
        sizeof(PHP_MD4_CTX)
@@ -43,6 +45,7 @@
        (php_hash_init_func_t) PHP_MD2Init,
        (php_hash_update_func_t) PHP_MD2Update,
        (php_hash_final_func_t) PHP_MD2Final,
+       (php_hash_copy_func_t) php_hash_copy,
        16,
        16,
        sizeof(PHP_MD2_CTX)
@@ -339,7 +342,6 @@
        memcpy(output, context->state, 16);
 }
 
-
 /*
  * Local variables:
  * tab-width: 4
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_ripemd.c?r1=1.10&r2=1.11&diff_format=u
Index: php-src/ext/hash/hash_ripemd.c
diff -u php-src/ext/hash/hash_ripemd.c:1.10 php-src/ext/hash/hash_ripemd.c:1.11
--- php-src/ext/hash/hash_ripemd.c:1.10 Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_ripemd.c      Mon Apr 21 15:37:07 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_ripemd.c,v 1.10 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_ripemd.c,v 1.11 2008/04/21 15:37:07 tony2001 Exp $ */
 
 /* Heavily borrowed from md5.c & sha1.c of PHP archival fame
    Note that ripemd laughs in the face of logic and uses
@@ -29,6 +29,7 @@
        (php_hash_init_func_t) PHP_RIPEMD128Init,
        (php_hash_update_func_t) PHP_RIPEMD128Update,
        (php_hash_final_func_t) PHP_RIPEMD128Final,
+       (php_hash_copy_func_t) php_hash_copy,
        16,
        64,
        sizeof(PHP_RIPEMD128_CTX)
@@ -38,6 +39,7 @@
        (php_hash_init_func_t) PHP_RIPEMD160Init,
        (php_hash_update_func_t) PHP_RIPEMD160Update,
        (php_hash_final_func_t) PHP_RIPEMD160Final,
+       (php_hash_copy_func_t) php_hash_copy,
        20,
        64,
        sizeof(PHP_RIPEMD160_CTX)
@@ -47,6 +49,7 @@
        (php_hash_init_func_t) PHP_RIPEMD256Init,
        (php_hash_update_func_t) PHP_RIPEMD256Update,
        (php_hash_final_func_t) PHP_RIPEMD256Final,
+       (php_hash_copy_func_t) php_hash_copy,
        32,
        64,
        sizeof(PHP_RIPEMD256_CTX)
@@ -56,6 +59,7 @@
        (php_hash_init_func_t) PHP_RIPEMD320Init,
        (php_hash_update_func_t) PHP_RIPEMD320Update,
        (php_hash_final_func_t) PHP_RIPEMD320Final,
+       (php_hash_copy_func_t) php_hash_copy,
        40,
        64,
        sizeof(PHP_RIPEMD320_CTX)
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_salsa.c?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/hash/hash_salsa.c
diff -u php-src/ext/hash/hash_salsa.c:1.7 php-src/ext/hash/hash_salsa.c:1.8
--- php-src/ext/hash/hash_salsa.c:1.7   Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_salsa.c       Mon Apr 21 15:37:07 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_salsa.c,v 1.7 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_salsa.c,v 1.8 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_salsa.h"
@@ -198,6 +198,7 @@
        (php_hash_init_func_t) PHP_SALSA10Init,
        (php_hash_update_func_t) PHP_SALSAUpdate,
        (php_hash_final_func_t) PHP_SALSAFinal,
+       (php_hash_copy_func_t) php_hash_copy,
        64,
        64,
        sizeof(PHP_SALSA_CTX)
@@ -207,6 +208,7 @@
        (php_hash_init_func_t) PHP_SALSA20Init,
        (php_hash_update_func_t) PHP_SALSAUpdate,
        (php_hash_final_func_t) PHP_SALSAFinal,
+       (php_hash_copy_func_t) php_hash_copy,
        64,
        64,
        sizeof(PHP_SALSA_CTX)
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_sha.c?r1=1.16&r2=1.17&diff_format=u
Index: php-src/ext/hash/hash_sha.c
diff -u php-src/ext/hash/hash_sha.c:1.16 php-src/ext/hash/hash_sha.c:1.17
--- php-src/ext/hash/hash_sha.c:1.16    Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_sha.c Mon Apr 21 15:37:07 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_sha.c,v 1.16 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_sha.c,v 1.17 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_sha.h"
@@ -70,6 +70,7 @@
        (php_hash_init_func_t) PHP_SHA1Init,
        (php_hash_update_func_t) PHP_SHA1Update,
        (php_hash_final_func_t) PHP_SHA1Final,
+       (php_hash_copy_func_t) php_hash_copy,
        20,
        64,
        sizeof(PHP_SHA1_CTX)
@@ -81,6 +82,7 @@
        (php_hash_init_func_t) PHP_SHA256Init,
        (php_hash_update_func_t) PHP_SHA256Update,
        (php_hash_final_func_t) PHP_SHA256Final,
+       (php_hash_copy_func_t) php_hash_copy,
        32,
        64,
        sizeof(PHP_SHA256_CTX)
@@ -476,6 +478,7 @@
        (php_hash_init_func_t) PHP_SHA384Init,
        (php_hash_update_func_t) PHP_SHA384Update,
        (php_hash_final_func_t) PHP_SHA384Final,
+       (php_hash_copy_func_t) php_hash_copy,
        48,
        128,
        sizeof(PHP_SHA384_CTX)
@@ -589,6 +592,7 @@
        (php_hash_init_func_t) PHP_SHA512Init,
        (php_hash_update_func_t) PHP_SHA512Update,
        (php_hash_final_func_t) PHP_SHA512Final,
+       (php_hash_copy_func_t) php_hash_copy,
        64,
        128,
        sizeof(PHP_SHA512_CTX)
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_snefru.c?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/hash/hash_snefru.c
diff -u php-src/ext/hash/hash_snefru.c:1.7 php-src/ext/hash/hash_snefru.c:1.8
--- php-src/ext/hash/hash_snefru.c:1.7  Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_snefru.c      Mon Apr 21 15:37:07 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_snefru.c,v 1.7 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_snefru.c,v 1.8 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_snefru.h"
@@ -197,6 +197,7 @@
        (php_hash_init_func_t) PHP_SNEFRUInit,
        (php_hash_update_func_t) PHP_SNEFRUUpdate,
        (php_hash_final_func_t) PHP_SNEFRUFinal,
+       (php_hash_copy_func_t) php_hash_copy,
        32,
        32,
        sizeof(PHP_SNEFRU_CTX)
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_tiger.c?r1=1.10&r2=1.11&diff_format=u
Index: php-src/ext/hash/hash_tiger.c
diff -u php-src/ext/hash/hash_tiger.c:1.10 php-src/ext/hash/hash_tiger.c:1.11
--- php-src/ext/hash/hash_tiger.c:1.10  Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_tiger.c       Mon Apr 21 15:37:07 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_tiger.c,v 1.10 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_tiger.c,v 1.11 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_tiger.h"
@@ -302,6 +302,7 @@
                (php_hash_init_func_t) PHP_##p##TIGERInit, \
                (php_hash_update_func_t) PHP_TIGERUpdate, \
                (php_hash_final_func_t) PHP_TIGER##b##Final, \
+               (php_hash_copy_func_t) php_hash_copy, \
                b/8, \
                64, \
                sizeof(PHP_TIGER_CTX) \
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash_whirlpool.c?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/hash/hash_whirlpool.c
diff -u php-src/ext/hash/hash_whirlpool.c:1.7 
php-src/ext/hash/hash_whirlpool.c:1.8
--- php-src/ext/hash/hash_whirlpool.c:1.7       Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/hash_whirlpool.c   Mon Apr 21 15:37:07 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash_whirlpool.c,v 1.7 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: hash_whirlpool.c,v 1.8 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #include "php_hash.h"
 
@@ -437,6 +437,7 @@
        (php_hash_init_func_t) PHP_WHIRLPOOLInit,
        (php_hash_update_func_t) PHP_WHIRLPOOLUpdate,
        (php_hash_final_func_t) PHP_WHIRLPOOLFinal,
+       (php_hash_copy_func_t) php_hash_copy,
        64,
        64,
        sizeof(PHP_WHIRLPOOL_CTX)
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/php_hash_adler32.h?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/hash/php_hash_adler32.h
diff -u php-src/ext/hash/php_hash_adler32.h:1.6 
php-src/ext/hash/php_hash_adler32.h:1.7
--- php-src/ext/hash/php_hash_adler32.h:1.6     Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/php_hash_adler32.h Mon Apr 21 15:37:07 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_hash_adler32.h,v 1.6 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: php_hash_adler32.h,v 1.7 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #ifndef PHP_HASH_ADLER32_H
 #define PHP_HASH_ADLER32_H
@@ -30,6 +30,7 @@
 PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context);
 PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *context, const unsigned 
char *input, size_t len);
 PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX 
*context);
+PHP_HASH_API int PHP_ADLER32Copy(const php_hash_ops *ops, PHP_ADLER32_CTX 
*orig_context, PHP_ADLER32_CTX *copy_context);
 
 #endif
 
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/php_hash_crc32.h?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/hash/php_hash_crc32.h
diff -u php-src/ext/hash/php_hash_crc32.h:1.6 
php-src/ext/hash/php_hash_crc32.h:1.7
--- php-src/ext/hash/php_hash_crc32.h:1.6       Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/php_hash_crc32.h   Mon Apr 21 15:37:07 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_hash_crc32.h,v 1.6 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: php_hash_crc32.h,v 1.7 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #ifndef PHP_HASH_CRC32_H
 #define PHP_HASH_CRC32_H
@@ -31,6 +31,7 @@
 PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char 
*input, size_t len);
 PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char 
*input, size_t len);
 PHP_HASH_API void PHP_CRC32Final(unsigned char digest[4], PHP_CRC32_CTX 
*context);
+PHP_HASH_API int PHP_CRC32Copy(const php_hash_ops *ops, PHP_CRC32_CTX 
*orig_context, PHP_CRC32_CTX *copy_context);
 
 #endif
 
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/php_hash.h?r1=1.25&r2=1.26&diff_format=u
Index: php-src/ext/hash/php_hash.h
diff -u php-src/ext/hash/php_hash.h:1.25 php-src/ext/hash/php_hash.h:1.26
--- php-src/ext/hash/php_hash.h:1.25    Wed Jan 30 09:56:21 2008
+++ php-src/ext/hash/php_hash.h Mon Apr 21 15:37:07 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_hash.h,v 1.25 2008/01/30 09:56:21 dmitry Exp $ */
+/* $Id: php_hash.h,v 1.26 2008/04/21 15:37:07 tony2001 Exp $ */
 
 #ifndef PHP_HASH_H
 #define PHP_HASH_H
@@ -37,11 +37,13 @@
 typedef void (*php_hash_init_func_t)(void *context);
 typedef void (*php_hash_update_func_t)(void *context, const unsigned char 
*buf, unsigned int count);
 typedef void (*php_hash_final_func_t)(unsigned char *digest, void *context);
+typedef int  (*php_hash_copy_func_t)(const void *ops, void *orig_context, void 
*dest_context);
 
 typedef struct _php_hash_ops {
        php_hash_init_func_t hash_init;
        php_hash_update_func_t hash_update;
        php_hash_final_func_t hash_final;
+       php_hash_copy_func_t hash_copy;
 
        int digest_size;
        int block_size;
@@ -128,6 +130,7 @@
 
 PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(const char *algo, int 
algo_len);
 PHP_HASH_API void php_hash_register_algo(const char *algo, const php_hash_ops 
*ops);
+PHP_HASH_API int php_hash_copy(const void *ops, void *orig_context, void 
*dest_context);
 
 static inline void php_hash_bin2hex(char *out, const unsigned char *in, int 
in_len)
 {

http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/hash_copy_001.phpt?view=markup&rev=1.1
Index: php-src/ext/hash/tests/hash_copy_001.phpt
+++ php-src/ext/hash/tests/hash_copy_001.phpt
--TEST--
hash_copy() basic tests
--FILE--
<?php

$algos = hash_algos();

foreach ($algos as $algo) {
        $orig = hash_init($algo);
        hash_update($orig, b"I can't remember anything");
        $copy = hash_copy($orig);
        var_dump(hash_final($orig));

        var_dump(hash_final($copy));
}

foreach ($algos as $algo) {
        $orig = hash_init($algo);
        hash_update($orig, b"I can't remember anything");
        $copy = hash_copy($orig);
        var_dump(hash_final($orig));

        hash_update($copy, b"Can’t tell if this is true or dream");
        var_dump(hash_final($copy));
}

echo "Done\n";
?>
--EXPECTF--     
string(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
string(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
string(32) "302c45586b53a984bd3a1237cb81c15f"
string(32) "302c45586b53a984bd3a1237cb81c15f"
string(32) "e35759f6ea35db254e415b5332269435"
string(32) "e35759f6ea35db254e415b5332269435"
string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
string(96) 
"6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
string(96) 
"6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
string(128) 
"caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
string(128) 
"caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
string(80) 
"785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
string(80) 
"785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
string(128) 
"6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
string(128) 
"6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
string(32) "a92be6c58be7688dc6cf9585a47aa625"
string(32) "a92be6c58be7688dc6cf9585a47aa625"
string(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
string(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
string(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
string(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
string(32) "32fb748ef5a36ca222511bcb99b044ee"
string(32) "32fb748ef5a36ca222511bcb99b044ee"
string(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
string(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
string(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
string(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
string(8) "28097c6f"
string(8) "28097c6f"
string(8) "e5cfc160"
string(8) "e5cfc160"
string(8) "4e7a1469"
string(8) "4e7a1469"
string(32) "86362472c8895e68e223ef8b3711d8d9"
string(32) "86362472c8895e68e223ef8b3711d8d9"
string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
string(32) "ee44418e0195a0c4a35d112722919a9c"
string(32) "ee44418e0195a0c4a35d112722919a9c"
string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
string(32) "8d0b157828328ae7d34d60b4b60c1dab"
string(32) "8d0b157828328ae7d34d60b4b60c1dab"
string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
string(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
string(32) "5c36f61062d091a8324991132c5e8dbd"
string(32) "302c45586b53a984bd3a1237cb81c15f"
string(32) "1d4196526aada3506efb4c7425651584"
string(32) "e35759f6ea35db254e415b5332269435"
string(32) "f255c114bd6ce94aad092b5141c00d46"
string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
string(40) "a273396f056554dcd491b5dea1e7baa3b89b802b"
string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
string(64) "268e7f4cf88504a53fd77136c4c4748169f46ff7150b376569ada9c374836944"
string(96) 
"6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
string(96) 
"0d44981d04bb11b1ef75d5c2932bd0aa2785e7bc454daac954d77e2ca10047879b58997533fc99650b20049c6cb9a6cc"
string(128) 
"caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
string(128) 
"28d7c721433782a880f840af0c3f3ea2cad4ef55de2114dda9d504cedeb110e1cf2519c49e4b5da3da4484bb6ba4fd1621ceadc6408f4410b2ebe9d83a4202c2"
string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
string(32) "f95f5e22b8875ee0c48219ae97f0674b"
string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
string(40) "900d615c1abe714e340f4ecd6a3d65599fd30ff4"
string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
string(64) "b9799db40d1af5614118c329169cdcd2c718db6af03bf945ea7f7ba72b8e14f4"
string(80) 
"785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
string(80) 
"d6d12c1fca7a9c4a59c1be4f40188e92a746a035219e0a6ca1ee53b36a8282527187f7dffaa57ecc"
string(128) 
"6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
string(128) 
"e8c6a921e7d8eac2fd21d4df6054bb27a02321b2beb5b01b6f88c40706164e64d67ec97519bf76c8af8df896745478b78d42a0159f1a0db16777771fd9d420dc"
string(32) "a92be6c58be7688dc6cf9585a47aa625"
string(32) "dc80d448032c9da9f1e0262985353c0f"
string(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
string(40) "dc80d448032c9da9f1e0262985353c0fe37e9551"
string(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
string(48) "dc80d448032c9da9f1e0262985353c0fe37e9551165c82e1"
string(32) "32fb748ef5a36ca222511bcb99b044ee"
string(32) "e5c4212432c0e266e581d4ee6a8e20a9"
string(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
string(40) "e5c4212432c0e266e581d4ee6a8e20a9d0d944e3"
string(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
string(48) "e5c4212432c0e266e581d4ee6a8e20a9d0d944e34804b0c4"
string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
string(64) "614ca924864fa0e8fa309aa0944e047d5edbfd4964a35858f4d8ec66a0fb88b0"
string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
string(64) "a00961e371287c71c527a41c14564f13b6ed12ac7cd9d5f5dfb3542a25e28d3b"
string(8) "28097c6f"
string(8) "471714d9"
string(8) "e5cfc160"
string(8) "59f8d3d2"
string(8) "4e7a1469"
string(8) "9939e63e"
string(32) "86362472c8895e68e223ef8b3711d8d9"
string(32) "ebeeeb05c18af1e53d2d127b561d5e0d"
string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
string(40) "f1a2c9604fb40899ad502abe0dfcec65115c8a9a"
string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
string(48) "d3a7315773a326678208650ed02510ed96cd488d74cd5231"
string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
string(56) "6d7132fabc83c9ab7913748b79ecf10e25409569d3ed144177f46731"
string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
string(64) "7a469868ad4b92891a3a44524c58a2b8d0f3bebb92b4cf47d19bc6aba973eb95"
string(32) "ee44418e0195a0c4a35d112722919a9c"
string(32) "6ecddb39615f43fd211839287ff38461"
string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
string(40) "bcd2e7821723ac22e122b8b7cbbd2daaa9a862df"
string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
string(48) "ae74619a88dcec1fbecde28e27f009a65ecc12170824d2cd"
string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
string(56) "fdaba6563f1334d40de24e311f14b324577f97c3b78b9439c408cdca"
string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
string(64) "289a2ba4820218bdb25a6534fbdf693f9de101362584fdd41e32244c719caa37"
string(32) "8d0b157828328ae7d34d60b4b60c1dab"
string(32) "ffa7993a4e183b245263fb1f63e27343"
string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
string(40) "375ee5ab3a9bd07a1dbe5d071e07b2afb3165e3b"
string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
string(48) "c650585f93c6e041e835caedc621f8c42d8bc6829fb76789"
string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
string(56) "bc674d465a822817d939f19b38edde083fe5668759836c203c56e3e4"
string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
string(64) "da70ad9bd09ed7c9675329ea2b5279d57761807c7aeac6340d94b5d494809457"
Done
--UEXPECTF--
unicode(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
unicode(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
unicode(32) "302c45586b53a984bd3a1237cb81c15f"
unicode(32) "302c45586b53a984bd3a1237cb81c15f"
unicode(32) "e35759f6ea35db254e415b5332269435"
unicode(32) "e35759f6ea35db254e415b5332269435"
unicode(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
unicode(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
unicode(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
unicode(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
unicode(96) 
"6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
unicode(96) 
"6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
unicode(128) 
"caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
unicode(128) 
"caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
unicode(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
unicode(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
unicode(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
unicode(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
unicode(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
unicode(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
unicode(80) 
"785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
unicode(80) 
"785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
unicode(128) 
"6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
unicode(128) 
"6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
unicode(32) "a92be6c58be7688dc6cf9585a47aa625"
unicode(32) "a92be6c58be7688dc6cf9585a47aa625"
unicode(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
unicode(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
unicode(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
unicode(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
unicode(32) "32fb748ef5a36ca222511bcb99b044ee"
unicode(32) "32fb748ef5a36ca222511bcb99b044ee"
unicode(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
unicode(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
unicode(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
unicode(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
unicode(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
unicode(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
unicode(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
unicode(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
unicode(8) "28097c6f"
unicode(8) "28097c6f"
unicode(8) "e5cfc160"
unicode(8) "e5cfc160"
unicode(8) "4e7a1469"
unicode(8) "4e7a1469"
unicode(32) "86362472c8895e68e223ef8b3711d8d9"
unicode(32) "86362472c8895e68e223ef8b3711d8d9"
unicode(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
unicode(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
unicode(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
unicode(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
unicode(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
unicode(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
unicode(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
unicode(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
unicode(32) "ee44418e0195a0c4a35d112722919a9c"
unicode(32) "ee44418e0195a0c4a35d112722919a9c"
unicode(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
unicode(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
unicode(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
unicode(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
unicode(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
unicode(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
unicode(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
unicode(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
unicode(32) "8d0b157828328ae7d34d60b4b60c1dab"
unicode(32) "8d0b157828328ae7d34d60b4b60c1dab"
unicode(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
unicode(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
unicode(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
unicode(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
unicode(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
unicode(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
unicode(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
unicode(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
unicode(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
unicode(32) "5c36f61062d091a8324991132c5e8dbd"
unicode(32) "302c45586b53a984bd3a1237cb81c15f"
unicode(32) "1d4196526aada3506efb4c7425651584"
unicode(32) "e35759f6ea35db254e415b5332269435"
unicode(32) "f255c114bd6ce94aad092b5141c00d46"
unicode(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
unicode(40) "a273396f056554dcd491b5dea1e7baa3b89b802b"
unicode(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
unicode(64) "268e7f4cf88504a53fd77136c4c4748169f46ff7150b376569ada9c374836944"
unicode(96) 
"6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
unicode(96) 
"0d44981d04bb11b1ef75d5c2932bd0aa2785e7bc454daac954d77e2ca10047879b58997533fc99650b20049c6cb9a6cc"
unicode(128) 
"caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
unicode(128) 
"28d7c721433782a880f840af0c3f3ea2cad4ef55de2114dda9d504cedeb110e1cf2519c49e4b5da3da4484bb6ba4fd1621ceadc6408f4410b2ebe9d83a4202c2"
unicode(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
unicode(32) "f95f5e22b8875ee0c48219ae97f0674b"
unicode(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
unicode(40) "900d615c1abe714e340f4ecd6a3d65599fd30ff4"
unicode(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
unicode(64) "b9799db40d1af5614118c329169cdcd2c718db6af03bf945ea7f7ba72b8e14f4"
unicode(80) 
"785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
unicode(80) 
"d6d12c1fca7a9c4a59c1be4f40188e92a746a035219e0a6ca1ee53b36a8282527187f7dffaa57ecc"
unicode(128) 
"6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
unicode(128) 
"e8c6a921e7d8eac2fd21d4df6054bb27a02321b2beb5b01b6f88c40706164e64d67ec97519bf76c8af8df896745478b78d42a0159f1a0db16777771fd9d420dc"
unicode(32) "a92be6c58be7688dc6cf9585a47aa625"
unicode(32) "dc80d448032c9da9f1e0262985353c0f"
unicode(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
unicode(40) "dc80d448032c9da9f1e0262985353c0fe37e9551"
unicode(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
unicode(48) "dc80d448032c9da9f1e0262985353c0fe37e9551165c82e1"
unicode(32) "32fb748ef5a36ca222511bcb99b044ee"
unicode(32) "e5c4212432c0e266e581d4ee6a8e20a9"
unicode(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
unicode(40) "e5c4212432c0e266e581d4ee6a8e20a9d0d944e3"
unicode(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
unicode(48) "e5c4212432c0e266e581d4ee6a8e20a9d0d944e34804b0c4"
unicode(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
unicode(64) "614ca924864fa0e8fa309aa0944e047d5edbfd4964a35858f4d8ec66a0fb88b0"
unicode(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
unicode(64) "a00961e371287c71c527a41c14564f13b6ed12ac7cd9d5f5dfb3542a25e28d3b"
unicode(8) "28097c6f"
unicode(8) "471714d9"
unicode(8) "e5cfc160"
unicode(8) "59f8d3d2"
unicode(8) "4e7a1469"
unicode(8) "9939e63e"
unicode(32) "86362472c8895e68e223ef8b3711d8d9"
unicode(32) "ebeeeb05c18af1e53d2d127b561d5e0d"
unicode(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
unicode(40) "f1a2c9604fb40899ad502abe0dfcec65115c8a9a"
unicode(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
unicode(48) "d3a7315773a326678208650ed02510ed96cd488d74cd5231"
unicode(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
unicode(56) "6d7132fabc83c9ab7913748b79ecf10e25409569d3ed144177f46731"
unicode(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
unicode(64) "7a469868ad4b92891a3a44524c58a2b8d0f3bebb92b4cf47d19bc6aba973eb95"
unicode(32) "ee44418e0195a0c4a35d112722919a9c"
unicode(32) "6ecddb39615f43fd211839287ff38461"
unicode(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
unicode(40) "bcd2e7821723ac22e122b8b7cbbd2daaa9a862df"
unicode(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
unicode(48) "ae74619a88dcec1fbecde28e27f009a65ecc12170824d2cd"
unicode(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
unicode(56) "fdaba6563f1334d40de24e311f14b324577f97c3b78b9439c408cdca"
unicode(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
unicode(64) "289a2ba4820218bdb25a6534fbdf693f9de101362584fdd41e32244c719caa37"
unicode(32) "8d0b157828328ae7d34d60b4b60c1dab"
unicode(32) "ffa7993a4e183b245263fb1f63e27343"
unicode(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
unicode(40) "375ee5ab3a9bd07a1dbe5d071e07b2afb3165e3b"
unicode(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
unicode(48) "c650585f93c6e041e835caedc621f8c42d8bc6829fb76789"
unicode(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
unicode(56) "bc674d465a822817d939f19b38edde083fe5668759836c203c56e3e4"
unicode(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
unicode(64) "da70ad9bd09ed7c9675329ea2b5279d57761807c7aeac6340d94b5d494809457"
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/hash_copy_002.phpt?view=markup&rev=1.1
Index: php-src/ext/hash/tests/hash_copy_002.phpt
+++ php-src/ext/hash/tests/hash_copy_002.phpt
--TEST--
hash_copy() errors
--FILE--
<?php

$r = hash_init("md5");
var_dump(hash_copy());
var_dump(hash_copy($r));
var_dump(hash_copy($r, $r));

echo "Done\n";
?>
--EXPECTF--     
Warning: hash_copy() expects exactly 1 parameter, 0 given in %s on line %d
NULL
resource(%d) of type (Hash Context)

Warning: hash_copy() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to