From: Niels Möller Date: Sun, 2 Oct 2005 20:41:30 +0000 (+0200) Subject: (sha1_block): Don't convert data from uint8_t to X-Git-Tag: nettle_1.13_release_20051006~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0bceeac3870a84a422f915585ee420fb81315d8;p=thirdparty%2Fnettle.git (sha1_block): Don't convert data from uint8_t to uint32_t, that's now the responsibility of _nettle_sha1_compress. Rev: src/nettle/sha1.c:1.11 --- diff --git a/sha1.c b/sha1.c index 5538bc48..cd81eb7e 100644 --- a/sha1.c +++ b/sha1.c @@ -78,24 +78,15 @@ sha1_init(struct sha1_ctx *ctx) ctx->index = 0; } +/* FIXME: Inline where used? */ static void sha1_block(struct sha1_ctx *ctx, const uint8_t *block) { - uint32_t data[SHA1_DATA_LENGTH]; - int i; - /* Update block count */ if (!++ctx->count_low) ++ctx->count_high; - /* FIXME: Move this processing to _nettle_sha1_compress. Then it can - access the data array via the stack pointer, and save one - register. */ - /* Endian independent conversion */ - for (i = 0; idigest, data); + _nettle_sha1_compress(ctx->digest, block); } void