Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nettle
nettle
Commits
82530186
Commit
82530186
authored
16 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(ROUND): Simplified macro.
Rev: nettle/sha256.c:1.2
parent
4e7d2c8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sha256.c
+5
-7
5 additions, 7 deletions
sha256.c
with
5 additions
and
7 deletions
sha256.c
+
5
−
7
View file @
82530186
...
...
@@ -117,14 +117,12 @@ K[64] =
iteration. This code is then replicated 8, using the next 8 values
from the W[] array each time */
/* FIXME: We can probably reorder this to optimize away at least one
* of T1 and T2. It's crucial that DATA is only used once, as that
* argument will have side effects. */
/* It's crucial that DATA is only used once, as that argument will
* have side effects. */
#define ROUND(a,b,c,d,e,f,g,h,k,data) do { \
uint32_t T1 = h + S1(e) + Choice(e,f,g) + k + data; \
uint32_t T2 = S0(a) + Majority(a,b,c); \
d += T1; \
h = T1 + T2; \
uint32_t T = h + S1(e) + Choice(e,f,g) + k + data; \
d += T; \
h = T + S0(a) + Majority(a,b,c); \
} while (0)
/* Initialize the SHA values */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment