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
Dmitry Baryshkov
nettle
Commits
92d6dbb3
Commit
92d6dbb3
authored
Jul 02, 2005
by
Adam Langley
Committed by
Niels Möller
Jul 02, 2005
Browse files
(memxor3): New function, suggested by Adam Langley.
Rev: src/nettle/memxor.c:1.4 Rev: src/nettle/memxor.h:1.4
parent
05179128
Changes
2
Hide whitespace changes
Inline
Side-by-side
memxor.c
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
;
}
memxor.h
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 */
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