Skip to content
Snippets Groups Projects
Commit e0bceeac authored by Niels Möller's avatar Niels Möller
Browse files

(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
parent 9f92eff8
No related branches found
No related tags found
Loading
...@@ -78,24 +78,15 @@ sha1_init(struct sha1_ctx *ctx) ...@@ -78,24 +78,15 @@ sha1_init(struct sha1_ctx *ctx)
ctx->index = 0; ctx->index = 0;
} }
/* FIXME: Inline where used? */
static void static void
sha1_block(struct sha1_ctx *ctx, const uint8_t *block) sha1_block(struct sha1_ctx *ctx, const uint8_t *block)
{ {
uint32_t data[SHA1_DATA_LENGTH];
int i;
/* Update block count */ /* Update block count */
if (!++ctx->count_low) if (!++ctx->count_low)
++ctx->count_high; ++ctx->count_high;
/* FIXME: Move this processing to _nettle_sha1_compress. Then it can _nettle_sha1_compress(ctx->digest, block);
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);
} }
void void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment