From 49d8fa1058aaf23c29e074b2314492ae40d2f557 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 21 Feb 2017 12:05:07 +0000 Subject: Types change: big pass on libstddjb and libunixonacid libdatastruct still missing, library still not functional --- src/libstdcrypto/sha512_update.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/libstdcrypto/sha512_update.c') diff --git a/src/libstdcrypto/sha512_update.c b/src/libstdcrypto/sha512_update.c index 63bc6fb..a6c004f 100644 --- a/src/libstdcrypto/sha512_update.c +++ b/src/libstdcrypto/sha512_update.c @@ -1,17 +1,16 @@ /* ISC license. */ -#include -#include +#include #include #include "sha512-internal.h" void sha512_update (SHA512Schedule *ctx, char const *buf, size_t len) { - register unsigned int pad = ctx->len & 0x7fU ; + unsigned int pad = ctx->len & 0x7fU ; ctx->len += len ; if (pad && len >= 128 - pad) { - byte_copy((char *)ctx->buf + pad, 128 - pad, buf) ; + memcpy((char *)ctx->buf + pad, buf, 128 - pad) ; buf += 128 - pad ; len -= 128 - pad ; pad = 0 ; sha512_transform(ctx, ctx->buf) ; } @@ -21,5 +20,5 @@ void sha512_update (SHA512Schedule *ctx, char const *buf, size_t len) sha512_transform(ctx, (unsigned char const *)buf) ; buf += 128 ; len -= 128 ; } - byte_copy((char *)ctx->buf + pad, len, buf) ; + memcpy((char *)ctx->buf + pad, buf, len) ; } -- cgit v1.2.3