Lines Matching +full:mod +full:- +full:12 +full:b
25 * Copyright (c) Andrew Tridgell 1997-1998.
51 return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s));
69 #define ROUND1(a,b,c,d,k,s) (a = lshift(a + F(b,c,d) + k, s))
70 #define ROUND2(a,b,c,d,k,s) (a = lshift(a + G(b,c,d) + k + (uint32_t)0x5A827999,s))
71 #define ROUND3(a,b,c,d,k,s) (a = lshift(a + H(b,c,d) + k + (uint32_t)0x6ED9EBA1,s))
76 while (words--) {
84 while (words--) {
92 uint32_t a, b, c, d;
95 b = hash[1];
99 ROUND1(a, b, c, d, in[0], 3);
100 ROUND1(d, a, b, c, in[1], 7);
101 ROUND1(c, d, a, b, in[2], 11);
102 ROUND1(b, c, d, a, in[3], 19);
103 ROUND1(a, b, c, d, in[4], 3);
104 ROUND1(d, a, b, c, in[5], 7);
105 ROUND1(c, d, a, b, in[6], 11);
106 ROUND1(b, c, d, a, in[7], 19);
107 ROUND1(a, b, c, d, in[8], 3);
108 ROUND1(d, a, b, c, in[9], 7);
109 ROUND1(c, d, a, b, in[10], 11);
110 ROUND1(b, c, d, a, in[11], 19);
111 ROUND1(a, b, c, d, in[12], 3);
112 ROUND1(d, a, b, c, in[13], 7);
113 ROUND1(c, d, a, b, in[14], 11);
114 ROUND1(b, c, d, a, in[15], 19);
116 ROUND2(a, b, c, d,in[ 0], 3);
117 ROUND2(d, a, b, c, in[4], 5);
118 ROUND2(c, d, a, b, in[8], 9);
119 ROUND2(b, c, d, a, in[12], 13);
120 ROUND2(a, b, c, d, in[1], 3);
121 ROUND2(d, a, b, c, in[5], 5);
122 ROUND2(c, d, a, b, in[9], 9);
123 ROUND2(b, c, d, a, in[13], 13);
124 ROUND2(a, b, c, d, in[2], 3);
125 ROUND2(d, a, b, c, in[6], 5);
126 ROUND2(c, d, a, b, in[10], 9);
127 ROUND2(b, c, d, a, in[14], 13);
128 ROUND2(a, b, c, d, in[3], 3);
129 ROUND2(d, a, b, c, in[7], 5);
130 ROUND2(c, d, a, b, in[11], 9);
131 ROUND2(b, c, d, a, in[15], 13);
133 ROUND3(a, b, c, d,in[ 0], 3);
134 ROUND3(d, a, b, c, in[8], 9);
135 ROUND3(c, d, a, b, in[4], 11);
136 ROUND3(b, c, d, a, in[12], 15);
137 ROUND3(a, b, c, d, in[2], 3);
138 ROUND3(d, a, b, c, in[10], 9);
139 ROUND3(c, d, a, b, in[6], 11);
140 ROUND3(b, c, d, a, in[14], 15);
141 ROUND3(a, b, c, d, in[1], 3);
142 ROUND3(d, a, b, c, in[9], 9);
143 ROUND3(c, d, a, b, in[5], 11);
144 ROUND3(b, c, d, a, in[13], 15);
145 ROUND3(a, b, c, d, in[3], 3);
146 ROUND3(d, a, b, c, in[11], 9);
147 ROUND3(c, d, a, b, in[7], 11);
148 ROUND3(b, c, d, a, in[15], 15);
151 hash[1] += b;
158 le32_to_cpu_array(ctx->block, ARRAY_SIZE(ctx->block));
159 md4_transform(ctx->hash, ctx->block);
164 mctx->hash[0] = 0x67452301;
165 mctx->hash[1] = 0xefcdab89;
166 mctx->hash[2] = 0x98badcfe;
167 mctx->hash[3] = 0x10325476;
168 mctx->byte_count = 0;
174 const uint32_t avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
176 mctx->byte_count += len;
179 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
184 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
189 len -= avail;
191 while (len >= sizeof(mctx->block)) {
192 memcpy(mctx->block, data, sizeof(mctx->block));
194 data += sizeof(mctx->block);
195 len -= sizeof(mctx->block);
198 memcpy(mctx->block, data, len);
203 const unsigned int offset = mctx->byte_count & 0x3f;
204 char *p = (char *)mctx->block + offset;
205 int padding = 56 - (offset + 1);
211 p = (char *)mctx->block;
216 mctx->block[14] = mctx->byte_count << 3;
217 mctx->block[15] = mctx->byte_count >> 29;
218 le32_to_cpu_array(mctx->block, (sizeof(mctx->block) -
220 md4_transform(mctx->hash, mctx->block);
221 cpu_to_le32_array(mctx->hash, ARRAY_SIZE(mctx->hash));
224 mctx->hash[0], mctx->hash[1], mctx->hash[2], mctx->hash[3]);
240 if (file[i] == '"' && file[i-1] != '\\')
251 if (file[i-1] == '*' && file[i] == '/')
257 /* FIXME: Handle .s files differently (eg. # starts comments) --RR */
279 i += parse_string(file+i, len - i, md);
285 i += parse_comment(file+i, len - i);
299 return objfile[len - 2] == '.' && objfile[len - 1] == 'a';
313 dirlen = base - objfile;
355 if ( *(p + strlen(p)-1) != '\\')
367 if ((strstr(line, dir)+strlen(dir)-1) == strrchr(line, '/')) {
395 /* objects for a module are listed in the first line of *.mod file. */
396 snprintf(filelist, sizeof(filelist), "%s.mod", modname);