repo.or.cz
/
shishi.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix.
[shishi.git]
/
crypto
/
memxor.c
blob
b3a8ae22680776755f14e2b18136f21d3a5d777b
1
/* memxor.c
2
*
3
* $Id$
4
*/
5
6
/* XOR LEN bytes starting at SRCADDR onto DESTADDR. Result undefined
7
if the source overlaps with the destination.
8
Return DESTADDR. */
9
10
#include
"memxor.h"
11
12
uint8_t
*
memxor
(
uint8_t
*
dst
,
const uint8_t
*
src
,
size_t
n
)
13
{
14
size_t
i
;
15
for
(
i
=
0
;
i
<
n
;
i
++)
16
dst
[
i
] ^=
src
[
i
];
17
18
return
dst
;
19
}