summaryrefslogtreecommitdiff
path: root/arctwo.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 /arctwo.c
parent2b49c1792d48a99eff57a01bf31a8f5e765115c4 (diff)
downloadnettle-3eb603d0d810b9298f5624aaa8a293c4b51e4b2a.tar.gz
Use size_t rather than unsigned for all cipher-related functions.
Diffstat (limited to 'arctwo.c')
-rw-r--r--arctwo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arctwo.c b/arctwo.c
index c4bc1551..f5753a8c 100644
--- a/arctwo.c
+++ b/arctwo.c
@@ -85,7 +85,7 @@ static const uint8_t arctwo_sbox[] = {
void
arctwo_encrypt (struct arctwo_ctx *ctx,
- unsigned length, uint8_t *dst, const uint8_t *src)
+ size_t length, uint8_t *dst, const uint8_t *src)
{
FOR_BLOCKS (length, dst, src, ARCTWO_BLOCK_SIZE)
{
@@ -130,7 +130,7 @@ arctwo_encrypt (struct arctwo_ctx *ctx,
void
arctwo_decrypt (struct arctwo_ctx *ctx,
- unsigned length, uint8_t *dst, const uint8_t *src)
+ size_t length, uint8_t *dst, const uint8_t *src)
{
FOR_BLOCKS (length, dst, src, ARCTWO_BLOCK_SIZE)
{
@@ -176,9 +176,9 @@ arctwo_decrypt (struct arctwo_ctx *ctx,
void
arctwo_set_key_ekb (struct arctwo_ctx *ctx,
- unsigned length, const uint8_t *key, unsigned ekb)
+ size_t length, const uint8_t *key, unsigned ekb)
{
- unsigned i;
+ size_t i;
/* Expanded key, treated as octets */
uint8_t S[128];
uint8_t x;
@@ -217,14 +217,14 @@ arctwo_set_key_ekb (struct arctwo_ctx *ctx,
}
void
-arctwo_set_key (struct arctwo_ctx *ctx, unsigned length, const uint8_t *key)
+arctwo_set_key (struct arctwo_ctx *ctx, size_t length, const uint8_t *key)
{
arctwo_set_key_ekb (ctx, length, key, 8 * length);
}
void
arctwo_set_key_gutmann (struct arctwo_ctx *ctx,
- unsigned length, const uint8_t *key)
+ size_t length, const uint8_t *key)
{
arctwo_set_key_ekb (ctx, length, key, 0);
}