diff options
author | Niels Möller <nisse@lysator.liu.se> | 2000-04-23 20:26:01 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2000-04-23 20:26:01 +0200 |
commit | 1f2e63077f1c6375ef127ff768cb489acfbdb9fb (patch) | |
tree | d433ab98332721765dc213f427cf75ec2235a62c /sha.c | |
parent | 31cda9563796bcd4c50dd3722d1e6242ed28dcac (diff) | |
download | nettle-1f2e63077f1c6375ef127ff768cb489acfbdb9fb.tar.gz |
* Constness improvements.
Rev: src/symmetric/include/md5.h:1.3
Rev: src/symmetric/include/sha.h:1.3
Rev: src/symmetric/md5.c:1.4
Rev: src/symmetric/sha.c:1.4
Diffstat (limited to 'sha.c')
-rw-r--r-- | sha.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -267,7 +267,8 @@ UINT32 STRING2INT(UINT8 *s) } #endif -static void sha_block(struct sha_ctx *ctx, UINT8 *block) +static void +sha_block(struct sha_ctx *ctx, const UINT8 *block) { UINT32 data[SHA_DATALEN]; int i; @@ -283,7 +284,9 @@ static void sha_block(struct sha_ctx *ctx, UINT8 *block) sha_transform(ctx, data); } -void sha_update(struct sha_ctx *ctx, UINT8 *buffer, UINT32 len) +void +sha_update(struct sha_ctx *ctx, + const UINT8 *buffer, UINT32 len) { if (ctx->index) { /* Try to fill partial block */ @@ -316,7 +319,8 @@ void sha_update(struct sha_ctx *ctx, UINT8 *buffer, UINT32 len) /* Final wrapup - pad to SHA_DATASIZE-byte boundary with the bit pattern 1 0* (64-bit count of bits processed, MSB-first) */ -void sha_final(struct sha_ctx *ctx) +void +sha_final(struct sha_ctx *ctx) { UINT32 data[SHA_DATALEN]; int i; @@ -354,7 +358,8 @@ void sha_final(struct sha_ctx *ctx) sha_transform(ctx, data); } -void sha_digest(struct sha_ctx *ctx, UINT8 *s) +void +sha_digest(struct sha_ctx *ctx, UINT8 *s) { int i; |