Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wim Lewis
nettle
Commits
1b5897ef
Commit
1b5897ef
authored
Apr 24, 2013
by
Niels Möller
Browse files
Deleted unneeded casts of memxor arguments.
parent
5cc019f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
1b5897ef
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.c: Include nettle-types.h, for uintptr_t. Replace all
...
...
salsa20-crypt.c
View file @
1b5897ef
...
...
@@ -61,10 +61,10 @@ salsa20_crypt(struct salsa20_ctx *ctx,
if
(
length
<=
SALSA20_BLOCK_SIZE
)
{
memxor3
(
c
,
m
,
(
uint8_t
*
)
x
,
length
);
memxor3
(
c
,
m
,
x
,
length
);
return
;
}
memxor3
(
c
,
m
,
(
uint8_t
*
)
x
,
SALSA20_BLOCK_SIZE
);
memxor3
(
c
,
m
,
x
,
SALSA20_BLOCK_SIZE
);
length
-=
SALSA20_BLOCK_SIZE
;
c
+=
SALSA20_BLOCK_SIZE
;
...
...
salsa20r12-crypt.c
View file @
1b5897ef
...
...
@@ -62,10 +62,10 @@ salsa20r12_crypt(struct salsa20_ctx *ctx,
if
(
length
<=
SALSA20_BLOCK_SIZE
)
{
memxor3
(
c
,
m
,
(
uint8_t
*
)
x
,
length
);
memxor3
(
c
,
m
,
x
,
length
);
return
;
}
memxor3
(
c
,
m
,
(
uint8_t
*
)
x
,
SALSA20_BLOCK_SIZE
);
memxor3
(
c
,
m
,
x
,
SALSA20_BLOCK_SIZE
);
length
-=
SALSA20_BLOCK_SIZE
;
c
+=
SALSA20_BLOCK_SIZE
;
...
...
sha3.c
View file @
1b5897ef
...
...
@@ -46,7 +46,7 @@ sha3_absorb (struct sha3_state *state, unsigned length, const uint8_t *data)
*
p
^=
LE_READ_UINT64
(
data
);
}
#else
/* !WORDS_BIGENDIAN */
memxor
(
(
uint8_t
*
)
state
->
a
,
data
,
length
);
memxor
(
state
->
a
,
data
,
length
);
#endif
sha3_permute
(
state
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment