summaryrefslogtreecommitdiff
path: root/drivers/staging/skein/skein_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/skein/skein_base.c')
-rw-r--r--drivers/staging/skein/skein_base.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/skein/skein_base.c b/drivers/staging/skein/skein_base.c
index dde6f7e..a4c3c0ce 100644
--- a/drivers/staging/skein/skein_base.c
+++ b/drivers/staging/skein/skein_base.c
@@ -230,8 +230,8 @@ int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val)
if (n >= SKEIN_256_BLOCK_BYTES)
n = SKEIN_256_BLOCK_BYTES;
/* "output" the ctr mode bytes */
- skein_put64_lsb_first(hash_val + i * SKEIN_256_BLOCK_BYTES,
- ctx->x, n);
+ skein_put64_lsb_first(hash_val + (i * SKEIN_256_BLOCK_BYTES),
+ ctx->x, n);
/* restore the counter mode key for next time */
memcpy(ctx->x, x, sizeof(x));
}
@@ -457,8 +457,8 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
if (n >= SKEIN_512_BLOCK_BYTES)
n = SKEIN_512_BLOCK_BYTES;
/* "output" the ctr mode bytes */
- skein_put64_lsb_first(hash_val + i * SKEIN_512_BLOCK_BYTES,
- ctx->x, n);
+ skein_put64_lsb_first(hash_val + (i * SKEIN_512_BLOCK_BYTES),
+ ctx->x, n);
/* restore the counter mode key for next time */
memcpy(ctx->x, x, sizeof(x));
}
@@ -679,8 +679,8 @@ int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val)
if (n >= SKEIN_1024_BLOCK_BYTES)
n = SKEIN_1024_BLOCK_BYTES;
/* "output" the ctr mode bytes */
- skein_put64_lsb_first(hash_val + i * SKEIN_1024_BLOCK_BYTES,
- ctx->x, n);
+ skein_put64_lsb_first(hash_val + (i * SKEIN_1024_BLOCK_BYTES),
+ ctx->x, n);
/* restore the counter mode key for next time */
memcpy(ctx->x, x, sizeof(x));
}
@@ -786,8 +786,8 @@ int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val)
if (n >= SKEIN_256_BLOCK_BYTES)
n = SKEIN_256_BLOCK_BYTES;
/* "output" the ctr mode bytes */
- skein_put64_lsb_first(hash_val + i * SKEIN_256_BLOCK_BYTES,
- ctx->x, n);
+ skein_put64_lsb_first(hash_val + (i * SKEIN_256_BLOCK_BYTES),
+ ctx->x, n);
/* restore the counter mode key for next time */
memcpy(ctx->x, x, sizeof(x));
}
@@ -823,8 +823,8 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
if (n >= SKEIN_512_BLOCK_BYTES)
n = SKEIN_512_BLOCK_BYTES;
/* "output" the ctr mode bytes */
- skein_put64_lsb_first(hash_val + i * SKEIN_512_BLOCK_BYTES,
- ctx->x, n);
+ skein_put64_lsb_first(hash_val + (i * SKEIN_512_BLOCK_BYTES),
+ ctx->x, n);
/* restore the counter mode key for next time */
memcpy(ctx->x, x, sizeof(x));
}
@@ -860,8 +860,8 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val)
if (n >= SKEIN_1024_BLOCK_BYTES)
n = SKEIN_1024_BLOCK_BYTES;
/* "output" the ctr mode bytes */
- skein_put64_lsb_first(hash_val + i * SKEIN_1024_BLOCK_BYTES,
- ctx->x, n);
+ skein_put64_lsb_first(hash_val + (i * SKEIN_1024_BLOCK_BYTES),
+ ctx->x, n);
/* restore the counter mode key for next time */
memcpy(ctx->x, x, sizeof(x));
}