@@ -31,28 +31,28 @@ static unsigned char PADDING[128] ={
31
31
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
32
32
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
33
33
34
- static php_uint32 D0 [8 ] = {
34
+ static php_hash_uint32 D0 [8 ] = {
35
35
0x243F6A88 , 0x85A308D3 , 0x13198A2E , 0x03707344 , 0xA4093822 , 0x299F31D0 , 0x082EFA98 , 0xEC4E6C89 };
36
36
37
- static php_uint32 K2 [32 ] = {
37
+ static php_hash_uint32 K2 [32 ] = {
38
38
0x452821E6 , 0x38D01377 , 0xBE5466CF , 0x34E90C6C , 0xC0AC29B7 , 0xC97C50DD , 0x3F84D5B5 , 0xB5470917 ,
39
39
0x9216D5D9 , 0x8979FB1B , 0xD1310BA6 , 0x98DFB5AC , 0x2FFD72DB , 0xD01ADFB7 , 0xB8E1AFED , 0x6A267E96 ,
40
40
0xBA7C9045 , 0xF12C7F99 , 0x24A19947 , 0xB3916CF7 , 0x0801F2E2 , 0x858EFC16 , 0x636920D8 , 0x71574E69 ,
41
41
0xA458FEA3 , 0xF4933D7E , 0x0D95748F , 0x728EB658 , 0x718BCD58 , 0x82154AEE , 0x7B54A41D , 0xC25A59B5 };
42
42
43
- static php_uint32 K3 [32 ] = {
43
+ static php_hash_uint32 K3 [32 ] = {
44
44
0x9C30D539 , 0x2AF26013 , 0xC5D1B023 , 0x286085F0 , 0xCA417918 , 0xB8DB38EF , 0x8E79DCB0 , 0x603A180E ,
45
45
0x6C9E0E8B , 0xB01E8A3E , 0xD71577C1 , 0xBD314B27 , 0x78AF2FDA , 0x55605C60 , 0xE65525F3 , 0xAA55AB94 ,
46
46
0x57489862 , 0x63E81440 , 0x55CA396A , 0x2AAB10B6 , 0xB4CC5C34 , 0x1141E8CE , 0xA15486AF , 0x7C72E993 ,
47
47
0xB3EE1411 , 0x636FBC2A , 0x2BA9C55D , 0x741831F6 , 0xCE5C3E16 , 0x9B87931E , 0xAFD6BA33 , 0x6C24CF5C };
48
48
49
- static php_uint32 K4 [32 ] = {
49
+ static php_hash_uint32 K4 [32 ] = {
50
50
0x7A325381 , 0x28958677 , 0x3B8F4898 , 0x6B4BB9AF , 0xC4BFE81B , 0x66282193 , 0x61D809CC , 0xFB21A991 ,
51
51
0x487CAC60 , 0x5DEC8032 , 0xEF845D5D , 0xE98575B1 , 0xDC262302 , 0xEB651B88 , 0x23893E81 , 0xD396ACC5 ,
52
52
0x0F6D6FF3 , 0x83F44239 , 0x2E0B4482 , 0xA4842004 , 0x69C8F04A , 0x9E1F9B5E , 0x21C66842 , 0xF6E96C9A ,
53
53
0x670C9C61 , 0xABD388F0 , 0x6A51A0D2 , 0xD8542F68 , 0x960FA728 , 0xAB5133A3 , 0x6EEF0B6C , 0x137A3BE4 };
54
54
55
- static php_uint32 K5 [32 ] = {
55
+ static php_hash_uint32 K5 [32 ] = {
56
56
0xBA3BF050 , 0x7EFB2A98 , 0xA1F1651D , 0x39AF0176 , 0x66CA593E , 0x82430E88 , 0x8CEE8619 , 0x456F9FB4 ,
57
57
0x7D84A5C3 , 0x3B8B5EBE , 0xE06F75D8 , 0x85C12073 , 0x401A449F , 0x56C16AA6 , 0x4ED3AA62 , 0x363F7706 ,
58
58
0x1BFEDF72 , 0x429B023D , 0x37D0D724 , 0xD00A1248 , 0xDB0FEAD3 , 0x49F1C09B , 0x075372C9 , 0x80991B7B ,
@@ -95,10 +95,10 @@ static short M7[32] = { 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0,
95
95
7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 , 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 };
96
96
97
97
/* {{{ Encode
98
- Encodes input (php_uint32 ) into output (unsigned char). Assumes len is
98
+ Encodes input (php_hash_uint32 ) into output (unsigned char). Assumes len is
99
99
a multiple of 4.
100
100
*/
101
- static void Encode (unsigned char * output , php_uint32 * input , unsigned int len )
101
+ static void Encode (unsigned char * output , php_hash_uint32 * input , unsigned int len )
102
102
{
103
103
unsigned int i , j ;
104
104
@@ -112,16 +112,16 @@ static void Encode(unsigned char *output, php_uint32 *input, unsigned int len)
112
112
/* }}} */
113
113
114
114
/* {{{ Decode
115
- Decodes input (unsigned char) into output (php_uint32 ). Assumes len is
115
+ Decodes input (unsigned char) into output (php_hash_uint32 ). Assumes len is
116
116
a multiple of 4.
117
117
*/
118
- static void Decode (php_uint32 * output , const unsigned char * input , unsigned int len )
118
+ static void Decode (php_hash_uint32 * output , const unsigned char * input , unsigned int len )
119
119
{
120
120
unsigned int i , j ;
121
121
122
122
for (i = 0 , j = 0 ; j < len ; i ++ , j += 4 ) {
123
- output [i ] = ((php_uint32 ) input [j ]) | (((php_uint32 ) input [j + 1 ]) << 8 ) |
124
- (((php_uint32 ) input [j + 2 ]) << 16 ) | (((php_uint32 ) input [j + 3 ]) << 24 );
123
+ output [i ] = ((php_hash_uint32 ) input [j ]) | (((php_hash_uint32 ) input [j + 1 ]) << 8 ) |
124
+ (((php_hash_uint32 ) input [j + 2 ]) << 16 ) | (((php_hash_uint32 ) input [j + 3 ]) << 24 );
125
125
}
126
126
}
127
127
/* }}} */
@@ -141,10 +141,10 @@ static void Decode(php_uint32 *output, const unsigned char *input, unsigned int
141
141
142
142
/* {{{ PHP_3HAVALTransform
143
143
*/
144
- static void PHP_3HAVALTransform (php_uint32 state [8 ], const unsigned char block [128 ])
144
+ static void PHP_3HAVALTransform (php_hash_uint32 state [8 ], const unsigned char block [128 ])
145
145
{
146
- php_uint32 E [8 ];
147
- php_uint32 x [32 ];
146
+ php_hash_uint32 E [8 ];
147
+ php_hash_uint32 x [32 ];
148
148
int i ;
149
149
150
150
Decode (x , block , 128 );
@@ -175,10 +175,10 @@ static void PHP_3HAVALTransform(php_uint32 state[8], const unsigned char block[1
175
175
176
176
/* {{{ PHP_4HAVALTransform
177
177
*/
178
- static void PHP_4HAVALTransform (php_uint32 state [8 ], const unsigned char block [128 ])
178
+ static void PHP_4HAVALTransform (php_hash_uint32 state [8 ], const unsigned char block [128 ])
179
179
{
180
- php_uint32 E [8 ];
181
- php_uint32 x [32 ];
180
+ php_hash_uint32 E [8 ];
181
+ php_hash_uint32 x [32 ];
182
182
int i ;
183
183
184
184
Decode (x , block , 128 );
@@ -212,10 +212,10 @@ static void PHP_4HAVALTransform(php_uint32 state[8], const unsigned char block[1
212
212
213
213
/* {{{ PHP_5HAVALTransform
214
214
*/
215
- static void PHP_5HAVALTransform (php_uint32 state [8 ], const unsigned char block [128 ])
215
+ static void PHP_5HAVALTransform (php_hash_uint32 state [8 ], const unsigned char block [128 ])
216
216
{
217
- php_uint32 E [8 ];
218
- php_uint32 x [32 ];
217
+ php_hash_uint32 E [8 ];
218
+ php_hash_uint32 x [32 ];
219
219
int i ;
220
220
221
221
Decode (x , block , 128 );
@@ -288,10 +288,10 @@ PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *context, const unsigned char *i
288
288
/* Compute number of bytes mod 128 */
289
289
index = (unsigned int ) ((context -> count [0 ] >> 3 ) & 0x7F );
290
290
/* Update number of bits */
291
- if ((context -> count [0 ] += ((php_uint32 ) inputLen << 3 )) < ((php_uint32 ) inputLen << 3 )) {
291
+ if ((context -> count [0 ] += ((php_hash_uint32 ) inputLen << 3 )) < ((php_hash_uint32 ) inputLen << 3 )) {
292
292
context -> count [1 ]++ ;
293
293
}
294
- context -> count [1 ] += ((php_uint32 ) inputLen >> 29 );
294
+ context -> count [1 ] += ((php_hash_uint32 ) inputLen >> 29 );
295
295
296
296
partLen = 128 - index ;
297
297
0 commit comments