summaryrefslogtreecommitdiff
path: root/cbc.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 /cbc.c
parent2b49c1792d48a99eff57a01bf31a8f5e765115c4 (diff)
downloadnettle-3eb603d0d810b9298f5624aaa8a293c4b51e4b2a.tar.gz
Use size_t rather than unsigned for all cipher-related functions.
Diffstat (limited to 'cbc.c')
-rw-r--r--cbc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cbc.c b/cbc.c
index e70619b3..16edd4dd 100644
--- a/cbc.c
+++ b/cbc.c
@@ -38,8 +38,8 @@
void
cbc_encrypt(void *ctx, nettle_crypt_func *f,
- unsigned block_size, uint8_t *iv,
- unsigned length, uint8_t *dst,
+ size_t block_size, uint8_t *iv,
+ size_t length, uint8_t *dst,
const uint8_t *src)
{
assert(!(length % block_size));
@@ -57,8 +57,8 @@ cbc_encrypt(void *ctx, nettle_crypt_func *f,
void
cbc_decrypt(void *ctx, nettle_crypt_func *f,
- unsigned block_size, uint8_t *iv,
- unsigned length, uint8_t *dst,
+ size_t block_size, uint8_t *iv,
+ size_t length, uint8_t *dst,
const uint8_t *src)
{
assert(!(length % block_size));
@@ -90,7 +90,7 @@ cbc_decrypt(void *ctx, nettle_crypt_func *f,
TMP_DECL(buffer, uint8_t, CBC_BUFFER_LIMIT);
TMP_DECL(initial_iv, uint8_t, NETTLE_MAX_CIPHER_BLOCK_SIZE);
- unsigned buffer_size;
+ size_t buffer_size;
if (length <= CBC_BUFFER_LIMIT)
buffer_size = length;