Unified · Split
| @@ -307,6 +307,8 @@ unsigned int len; · 306 unmodified lines | |||
| 307 | (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); | 307 | (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | #include <string.h> | ||
| 311 | |||
| 310 | /* Note: Replace "for loop" with standard memcpy if possible. | 312 | /* Note: Replace "for loop" with standard memcpy if possible. |
| 311 | */ | 313 | */ |
| 312 | static void MD5_memcpy (output, input, len) | 314 | static void MD5_memcpy (output, input, len) |
| @@ -314,10 +316,12 @@ POINTER output; · 1 unmodified line | |||
| 314 | POINTER input; | 316 | POINTER input; |
| 315 | unsigned int len; | 317 | unsigned int len; |
| 316 | { | 318 | { |
| 317 | unsigned int i; | 319 | //unsigned int i; |
| 318 | 320 | // | |
| 319 | for (i = 0; i < len; i++) | 321 | //for (i = 0; i < len; i++) |
| 320 | output[i] = input[i]; | 322 | // output[i] = input[i]; |
| 323 | |||
| 324 | memcpy(output, input, len); | ||
| 321 | } | 325 | } |
| 322 | 326 | ||
| 323 | /* Note: Replace "for loop" with standard memset if possible. | 327 | /* Note: Replace "for loop" with standard memset if possible. |
| @@ -327,8 +331,10 @@ POINTER output; · 3 unmodified lines | |||
| 327 | int value; | 331 | int value; |
| 328 | unsigned int len; | 332 | unsigned int len; |
| 329 | { | 333 | { |
| 330 | unsigned int i; | 334 | //unsigned int i; |
| 331 | 335 | // | |
| 332 | for (i = 0; i < len; i++) | 336 | //for (i = 0; i < len; i++) |
| 333 | ((char *)output)[i] = (char)value; | 337 | // ((char *)output)[i] = (char)value; |
| 338 | |||
| 339 | memset(output, value, len); | ||
| 334 | } | 340 | } |