summaryrefslogtreecommitdiff
path: root/gcm.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-04-26 09:23:44 +0200
committerNiels Möller <nisse@lysator.liu.se>2013-04-26 09:23:44 +0200
commit3eb603d0d810b9298f5624aaa8a293c4b51e4b2a (patch)
treedfc2ec4ca53377b1735d507bc1c8ba3a249aa5b1 /gcm.c
parent2b49c1792d48a99eff57a01bf31a8f5e765115c4 (diff)
downloadnettle-3eb603d0d810b9298f5624aaa8a293c4b51e4b2a.tar.gz
Use size_t rather than unsigned for all cipher-related functions.
Diffstat (limited to 'gcm.c')
-rw-r--r--gcm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcm.c b/gcm.c
index 8c693277..de5321e7 100644
--- a/gcm.c
+++ b/gcm.c
@@ -385,7 +385,7 @@ gcm_hash_sizes(const struct gcm_key *key, union gcm_block *x,
*/
void
gcm_set_iv(struct gcm_ctx *ctx, const struct gcm_key *key,
- unsigned length, const uint8_t *iv)
+ size_t length, const uint8_t *iv)
{
if (length == GCM_IV_SIZE)
{
@@ -424,7 +424,7 @@ gcm_update(struct gcm_ctx *ctx, const struct gcm_key *key,
static void
gcm_crypt(struct gcm_ctx *ctx, void *cipher, nettle_crypt_func *f,
- unsigned length, uint8_t *dst, const uint8_t *src)
+ size_t length, uint8_t *dst, const uint8_t *src)
{
uint8_t buffer[GCM_BLOCK_SIZE];
@@ -462,7 +462,7 @@ gcm_crypt(struct gcm_ctx *ctx, void *cipher, nettle_crypt_func *f,
void
gcm_encrypt (struct gcm_ctx *ctx, const struct gcm_key *key,
void *cipher, nettle_crypt_func *f,
- unsigned length, uint8_t *dst, const uint8_t *src)
+ size_t length, uint8_t *dst, const uint8_t *src)
{
assert(ctx->data_size % GCM_BLOCK_SIZE == 0);
@@ -475,7 +475,7 @@ gcm_encrypt (struct gcm_ctx *ctx, const struct gcm_key *key,
void
gcm_decrypt(struct gcm_ctx *ctx, const struct gcm_key *key,
void *cipher, nettle_crypt_func *f,
- unsigned length, uint8_t *dst, const uint8_t *src)
+ size_t length, uint8_t *dst, const uint8_t *src)
{
assert(ctx->data_size % GCM_BLOCK_SIZE == 0);