Differences From Artifact [2ed1eeca9f]:
- File src/OFMD5Hash.m — part of check-in [8892ae9fcc] at 2012-07-12 01:28:46 on branch trunk — Don't access isa directly. (user: js, size: 6827) [annotate] [blame] [check-ins using]
To Artifact [233d143bc4]:
- File
src/OFMD5Hash.m
— part of check-in
[1cb8fee5c3]
at
2012-10-13 21:06:59
on branch trunk
— of_bswap* -> OF_BSWAP*.
This makes it clear that multiple evaluation of parameters is possible. (user: js, size: 7035) [annotate] [blame] [check-ins using]
︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + + + + + + + + + + + + + | #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f, w, x, y, z, data, s) \ (w += f(x, y, z) + data, w = w << s | w >> (32 - s), w += x) #ifdef OF_BIG_ENDIAN static OF_INLINE void BSWAP32_VEC_IF_BE(uint32_t *buffer, size_t length) { while (length--) { *buffer = OF_BSWAP32(*buffer); buffer++; } } #else # define BSWAP32_VEC_IF_BE(buffer, length) #endif static void md5_transform(uint32_t buffer[4], const uint32_t in[16]) { register uint32_t a, b, c, d; a = buffer[0]; |
︙ | |||
173 174 175 176 177 178 179 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | - + - + | if (length < t) { memcpy(p, buffer_, length); return; } memcpy(p, buffer_, t); |
︙ | |||
219 220 221 222 223 224 225 | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + - + - + | /* Bytes of padding needed to make 64 bytes */ count = 64 - 1 - count; /* Pad out to 56 mod 64 */ if (count < 8) { /* Two lots of padding: Pad the first block to 64 bytes */ memset(p, 0, count); |