version 1.1.1.1, 2012/02/21 23:47:56
|
version 1.1.1.4, 2014/06/15 20:03:49
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| PHP Version 5 | |
| PHP Version 5 | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2014 The PHP Group | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 34 PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *c
|
Line 34 PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *c
|
s[0] = context->state & 0xffff; |
s[0] = context->state & 0xffff; |
s[1] = (context->state >> 16) & 0xffff; |
s[1] = (context->state >> 16) & 0xffff; |
for (i = 0; i < len; ++i) { |
for (i = 0; i < len; ++i) { |
s[0] = (s[0] + input[i]) % 65521; | s[0] += input[i]; |
s[1] = (s[1] + s[0]) % 65521; | s[1] += s[0]; |
| if (s[1]>=0x7fffffff) |
| { |
| s[0] = s[0] % 65521; |
| s[1] = s[1] % 65521; |
| } |
} |
} |
|
s[0] = s[0] % 65521; |
|
s[1] = s[1] % 65521; |
context->state = s[0] + (s[1] << 16); |
context->state = s[0] + (s[1] << 16); |
} |
} |
|
|