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
Brian Smith
nettle
Commits
894e849b
Commit
894e849b
authored
Nov 15, 2012
by
Niels Möller
Browse files
Fixes for big-endian sha3 code.
parent
314365b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
894e849b
2012-11-15 Niels Möller <nisse@lysator.liu.se>
* sha3.c (sha3_absorb): Fixed big-endian code. Need macros.h.
* macros.h (LE_READ_UINT64): New macro.
2012-11-13 Niels Möller <nisse@lysator.liu.se>
...
...
sha3.c
View file @
894e849b
...
...
@@ -32,6 +32,7 @@
#include
"sha3.h"
#include
"macros.h"
#include
"memxor.h"
static
void
...
...
@@ -41,7 +42,7 @@ sha3_absorb (struct sha3_state *state, unsigned length, const uint8_t *data)
#if WORDS_BIGENDIAN
{
uint64_t
*
p
;
for
(
p
=
&
state
->
a
[
0
][
0
]
;
length
>
0
;
p
++
,
length
-=
8
,
data
+=
8
)
for
(
p
=
state
->
a
;
length
>
0
;
p
++
,
length
-=
8
,
data
+=
8
)
*
p
^=
LE_READ_UINT64
(
data
);
}
#else
/* !WORDS_BIGENDIAN */
...
...
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