*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: md4c.c,v 1.7 1997/01/06 00:18:22 niklas Exp $";
+static char rcsid[] = "$OpenBSD: md4c.c,v 1.8 1997/01/07 10:09:00 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
{
unsigned char bits[8];
unsigned int index, padLen;
+ u_int32_t hi, lo;
/* Save number of bits */
- Encode (bits, ((void *)&context->count) + 4, 4);
- Encode (bits + 4, &context->count, 4);
+ hi = context->count >> 32;
+ lo = context->count & 0xffffffff;
+ Encode (bits, &lo, 4);
+ Encode (bits + 4, &hi, 4);
/* Pad out to 56 mod 64.
*/
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: md5c.c,v 1.7 1997/01/06 00:18:23 niklas Exp $";
+static char rcsid[] = "$OpenBSD: md5c.c,v 1.8 1997/01/07 10:09:00 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
unsigned char bits[8];
unsigned int index;
size_t padLen;
+ u_int32_t hi, lo;
/* Save number of bits */
- Encode (bits, ((void *)&context->count) + 4, 4);
- Encode (bits + 4, &context->count, 4);
+ hi = context->count >> 32;
+ lo = context->count & 0xffffffff;
+ Encode (bits, &lo, 4);
+ Encode (bits + 4, &hi, 4);
/* Pad out to 56 mod 64. */
index = (unsigned int)((context->count >> 3) & 0x3f);