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
Snippets
Deploy
Releases
Container registry
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
David Carlier
nettle
Commits
92d6dbb3
Commit
92d6dbb3
authored
19 years ago
by
Adam Langley
Committed by
Niels Möller
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
(memxor3): New function, suggested by Adam Langley.
Rev: src/nettle/memxor.c:1.4 Rev: src/nettle/memxor.h:1.4
parent
05179128
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
memxor.c
+13
-1
13 additions, 1 deletion
memxor.c
memxor.h
+1
-0
1 addition, 0 deletions
memxor.h
with
14 additions
and
1 deletion
memxor.c
+
13
−
1
View file @
92d6dbb3
...
...
@@ -13,7 +13,8 @@
#include
"memxor.h"
uint8_t
*
memxor
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
size_t
n
)
uint8_t
*
memxor
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
size_t
n
)
{
size_t
i
;
for
(
i
=
0
;
i
<
n
;
i
++
)
...
...
@@ -21,3 +22,14 @@ uint8_t *memxor(uint8_t *dst, const uint8_t *src, size_t n)
return
dst
;
}
uint8_t
*
memxor3
(
uint8_t
*
dst
,
const
uint8_t
*
a
,
const
uint8_t
*
b
,
size_t
n
)
{
size_t
i
;
for
(
i
=
0
;
i
<
n
;
i
++
)
dst
[
i
]
=
a
[
i
]
^
b
[
i
];
return
dst
;
}
This diff is collapsed.
Click to expand it.
memxor.h
+
1
−
0
View file @
92d6dbb3
...
...
@@ -9,5 +9,6 @@
#include
"nettle-types.h"
uint8_t
*
memxor
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
size_t
n
);
uint8_t
*
memxor3
(
uint8_t
*
dst
,
const
uint8_t
*
a
,
const
uint8_t
*
b
,
size_t
n
);
#endif
/* NETTLE_MEMXOR_H_INCLUDED */
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