summaryrefslogtreecommitdiff
path: root/src/libstdcrypto/md5_update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstdcrypto/md5_update.c')
-rw-r--r--src/libstdcrypto/md5_update.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstdcrypto/md5_update.c b/src/libstdcrypto/md5_update.c
index c03a598..3b53abb 100644
--- a/src/libstdcrypto/md5_update.c
+++ b/src/libstdcrypto/md5_update.c
@@ -1,11 +1,13 @@
/* ISC license. */
+#include <sys/types.h>
+#include <stdint.h>
#include <skalibs/uint32.h>
#include <skalibs/bytestr.h>
#include <skalibs/md5.h>
#include "md5-internal.h"
-void md5_update (MD5Schedule *ctx, char const *s, unsigned int len)
+void md5_update (MD5Schedule *ctx, char const *s, size_t len)
{
register uint32 t = ctx->bits[0] ;
if ((ctx->bits[0] = t + (len << 3)) < t)
@@ -23,14 +25,14 @@ void md5_update (MD5Schedule *ctx, char const *s, unsigned int len)
}
byte_copy((char *)p, t, s) ;
uint32_little_endian((char *)ctx->in, 16) ;
- md5_transform(ctx->buf, (uint32 *)ctx->in) ;
+ md5_transform(ctx->buf, (uint32_t *)ctx->in) ;
s += t ; len -= t ;
}
while (len >= 64)
{
byte_copy((char *)ctx->in, 64, s) ;
uint32_little_endian((char *)ctx->in, 16) ;
- md5_transform(ctx->buf, (uint32 *)ctx->in) ;
+ md5_transform(ctx->buf, (uint32_t *)ctx->in) ;
s += 64 ; len -= 64 ;
}
byte_copy((char *)ctx->in, len, s) ;