/* Handle any leading odd-sized chunks */
/* Handle any leading odd-sized chunks */
uint8_t *p = (uint8_t*) ctx->in + t;
t = 64 - t;
uint8_t *p = (uint8_t*) ctx->in + t;
t = 64 - t;
memcpy(p, buf, len);
return;
}
memcpy(p, buf, t);
memcpy(p, buf, len);
return;
}
memcpy(p, buf, t);
- byteReverse(aligned_ptr, 16);
- MD5Transform(ctx->buf, aligned_ptr);
+ byteReverse(aligned_ptr, 16);
+ MD5Transform(ctx->buf, aligned_ptr);
buf += t;
len -= t;
}
/* Process data in 64-byte chunks */
buf += t;
len -= t;
}
/* Process data in 64-byte chunks */
memcpy(ctx->in, buf, 64);
byteReverse(aligned_ptr, 16);
MD5Transform(ctx->buf, aligned_ptr);
memcpy(ctx->in, buf, 64);
byteReverse(aligned_ptr, 16);
MD5Transform(ctx->buf, aligned_ptr);
count = 64 - 1 - count;
/* Pad out to 56 mod 64 */
count = 64 - 1 - count;
/* Pad out to 56 mod 64 */
/* Two lots of padding: Pad the first block to 64 bytes */
memset(p, 0, count);
byteReverse(aligned_ptr, 16);
/* Two lots of padding: Pad the first block to 64 bytes */
memset(p, 0, count);
byteReverse(aligned_ptr, 16);
/* Now fill the next block with 56 bytes */
memset(ctx->in, 0, 56);
/* Now fill the next block with 56 bytes */
memset(ctx->in, 0, 56);
/* Pad block to 56 bytes */
memset(p, 0, count - 8);
}
/* Pad block to 56 bytes */
memset(p, 0, count - 8);
}
byteReverse(aligned_ptr, 14);
/* Append length in bits and transform */
byteReverse(aligned_ptr, 14);
/* Append length in bits and transform */