Re: svn: /php/php-src/trunk/ext/hash/ hash_joaat.c php_hash_joaat.h tests/hash_copy_001.phpt
| From: | Hannes Magnusson | Date: | Sat, 03 Apr 2010 14:51:43 +0000 |
| Subject: | Re: svn: /php/php-src/trunk/ext/hash/ hash_joaat.c php_hash_joaat.h tests/hash_copy_001.phpt | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-62194@lists.php.net to get a copy of this message | ||
On Sun, Mar 28, 2010 at 10:01, Martin Jansen <mj@php.net> wrote:
> mj Sun, 28 Mar 2010 10:01:02 +0000
>
> Revision:
> http://svn.php.net/viewvc?view=revision&revision=296963
>
> Log:
> JOAAT hashing now supports incremental hashing.
>
> Changed paths:
> U php/php-src/trunk/ext/hash/hash_joaat.c
> U php/php-src/trunk/ext/hash/php_hash_joaat.h
> U php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt
>
> Modified: php/php-src/trunk/ext/hash/hash_joaat.c
> ===================================================================
> --- php/php-src/trunk/ext/hash/hash_joaat.c 2010-03-28 09:04:51 UTC (rev 296962)
> +++ php/php-src/trunk/ext/hash/hash_joaat.c 2010-03-28 10:01:02 UTC (rev 296963)
> @@ -42,7 +42,7 @@
>
> PHP_HASH_API void PHP_JOAATUpdate(PHP_JOAAT_CTX *context, const unsigned char *input,
> unsigned int inputLen)
> {
> - context->state = joaat_buf((void *)input, inputLen);
> + context->state = joaat_buf((void *)input, inputLen, context->state);
> }
>
> PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[4], PHP_JOAAT_CTX * context)
> @@ -71,9 +71,8 @@
> * 32 bit hash as a static hash type
> */
> static php_hash_uint32
> -joaat_buf(void *buf, size_t len)
> +joaat_buf(void *buf, size_t len, php_hash_uint32 hval)
> {
> - php_hash_uint32 hval = 0;
> size_t i;
> unsigned char *input = (unsigned char *)buf;
>
>
> Modified: php/php-src/trunk/ext/hash/php_hash_joaat.h
> ===================================================================
> --- php/php-src/trunk/ext/hash/php_hash_joaat.h 2010-03-28 09:04:51 UTC (rev 296962)
> +++ php/php-src/trunk/ext/hash/php_hash_joaat.h 2010-03-28 10:01:02 UTC (rev 296963)
> @@ -29,7 +29,7 @@
> PHP_HASH_API void PHP_JOAATUpdate(PHP_JOAAT_CTX *context, const unsigned char *input,
> unsigned int inputLen);
> PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[16], PHP_JOAAT_CTX * context);
>
> -static php_hash_uint32 joaat_buf(void *buf, size_t len);
> +static php_hash_uint32 joaat_buf(void *buf, size_t len, php_hash_uint32 hval);
>
> #endif
>
>
> Modified: php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt
> ===================================================================
> --- php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt 2010-03-28 09:04:51 UTC (rev 296962)
> +++ php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt 2010-03-28 10:01:02 UTC (rev 296963)
> @@ -253,7 +253,7 @@
> string(16) "5e8c64fba6a5ffcf"
> string(5) "joaat"
> string(8) "aaebf370"
> -string(8) "72e280c2"
> +string(8) "513479b4"
Changing existing hash testcases looks creepy.
Is this something that should be mentioned in UPDATING notes?
-Hannes