From b8bfc32ff2fe1084614332bdda4d3b7805f62da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Fri, 26 Apr 2013 10:28:57 +0200 Subject: Use size_t rather than unsigned for all hash-related functions. --- gcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcm.c') diff --git a/gcm.c b/gcm.c index de5321e7..6893d515 100644 --- a/gcm.c +++ b/gcm.c @@ -349,7 +349,7 @@ gcm_set_key(struct gcm_key *key, static void gcm_hash(const struct gcm_key *key, union gcm_block *x, - unsigned length, const uint8_t *data) + size_t length, const uint8_t *data) { for (; length >= GCM_BLOCK_SIZE; length -= GCM_BLOCK_SIZE, data += GCM_BLOCK_SIZE) @@ -412,7 +412,7 @@ gcm_set_iv(struct gcm_ctx *ctx, const struct gcm_key *key, void gcm_update(struct gcm_ctx *ctx, const struct gcm_key *key, - unsigned length, const uint8_t *data) + size_t length, const uint8_t *data) { assert(ctx->auth_size % GCM_BLOCK_SIZE == 0); assert(ctx->data_size == 0); @@ -488,7 +488,7 @@ gcm_decrypt(struct gcm_ctx *ctx, const struct gcm_key *key, void gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key, void *cipher, nettle_crypt_func *f, - unsigned length, uint8_t *digest) + size_t length, uint8_t *digest) { uint8_t buffer[GCM_BLOCK_SIZE]; -- cgit v1.2.1