diff options
author | Niels Möller <nisse@lysator.liu.se> | 2005-10-02 22:41:30 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2005-10-02 22:41:30 +0200 |
commit | e0bceeac3870a84a422f915585ee420fb81315d8 (patch) | |
tree | 7206e9345624b9a7d818034f01031c293396881e /sha1.c | |
parent | 9f92eff83a2627cf98e7b45ea3b7004470a36396 (diff) | |
download | nettle-e0bceeac3870a84a422f915585ee420fb81315d8.tar.gz |
(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
Diffstat (limited to 'sha1.c')
-rw-r--r-- | sha1.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -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; i<SHA1_DATA_LENGTH; i++, block += 4) - data[i] = READ_UINT32(block); - - _nettle_sha1_compress(ctx->digest, data); + _nettle_sha1_compress(ctx->digest, block); } void |