Skip to content
Snippets Groups Projects
Commit 1b5897ef authored by Niels Möller's avatar Niels Möller
Browse files

Deleted unneeded casts of memxor arguments.

parent 5cc019f9
Branches
Tags
No related merge requests found
2013-04-24 Niels Möller <nisse@lysator.liu.se> 2013-04-24 Niels Möller <nisse@lysator.liu.se>
* salsa20-crypt.c (salsa20_crypt): Deleted cast of memxor
argument, no longer needed.
* salsa20r12-crypt.c (salsa20r12_crypt): Likewise.
* sha3.c (sha3_absorb): Likewise.
* memxor.h: Updated prototypes. Drop include of nettle-types.h. * memxor.h: Updated prototypes. Drop include of nettle-types.h.
* memxor.c: Include nettle-types.h, for uintptr_t. Replace all * memxor.c: Include nettle-types.h, for uintptr_t. Replace all
......
...@@ -61,10 +61,10 @@ salsa20_crypt(struct salsa20_ctx *ctx, ...@@ -61,10 +61,10 @@ salsa20_crypt(struct salsa20_ctx *ctx,
if (length <= SALSA20_BLOCK_SIZE) if (length <= SALSA20_BLOCK_SIZE)
{ {
memxor3 (c, m, (uint8_t *) x, length); memxor3 (c, m, x, length);
return; return;
} }
memxor3 (c, m, (uint8_t *) x, SALSA20_BLOCK_SIZE); memxor3 (c, m, x, SALSA20_BLOCK_SIZE);
length -= SALSA20_BLOCK_SIZE; length -= SALSA20_BLOCK_SIZE;
c += SALSA20_BLOCK_SIZE; c += SALSA20_BLOCK_SIZE;
......
...@@ -62,10 +62,10 @@ salsa20r12_crypt(struct salsa20_ctx *ctx, ...@@ -62,10 +62,10 @@ salsa20r12_crypt(struct salsa20_ctx *ctx,
if (length <= SALSA20_BLOCK_SIZE) if (length <= SALSA20_BLOCK_SIZE)
{ {
memxor3 (c, m, (uint8_t *) x, length); memxor3 (c, m, x, length);
return; return;
} }
memxor3 (c, m, (uint8_t *) x, SALSA20_BLOCK_SIZE); memxor3 (c, m, x, SALSA20_BLOCK_SIZE);
length -= SALSA20_BLOCK_SIZE; length -= SALSA20_BLOCK_SIZE;
c += SALSA20_BLOCK_SIZE; c += SALSA20_BLOCK_SIZE;
......
...@@ -46,7 +46,7 @@ sha3_absorb (struct sha3_state *state, unsigned length, const uint8_t *data) ...@@ -46,7 +46,7 @@ sha3_absorb (struct sha3_state *state, unsigned length, const uint8_t *data)
*p ^= LE_READ_UINT64 (data); *p ^= LE_READ_UINT64 (data);
} }
#else /* !WORDS_BIGENDIAN */ #else /* !WORDS_BIGENDIAN */
memxor ((uint8_t *) state->a, data, length); memxor (state->a, data, length);
#endif #endif
sha3_permute (state); sha3_permute (state);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment