summaryrefslogtreecommitdiff
path: root/src/libstdcrypto/md5_update.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-01-21 15:46:20 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-01-21 15:46:20 +0000
commit2746b131aa482ac17c94bc6b82e58dbcc1b752cf (patch)
tree87e50c57bc8458b0809c280ab5d00042d1102925 /src/libstdcrypto/md5_update.c
parent05db4ba46ae1ca6143bb9b432d1e05e69eddd263 (diff)
downloadskalibs-2746b131aa482ac17c94bc6b82e58dbcc1b752cf.tar.xz
Types fix: librandom, libstdcrypto
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) ;