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
5f073a6cd4851bf7459453d2c2ff01071c2f3099
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
#if HAVE_CONFIG_H
11
# include
"config.h"
12
#endif
13
14
#include
"memxor.h"
15
16
uint8_t
*
memxor
(
uint8_t
*
dst
,
const uint8_t
*
src
,
size_t
n
)
17
{
18
size_t
i
;
19
for
(
i
=
0
;
i
<
n
;
i
++)
20
dst
[
i
] ^=
src
[
i
];
21
22
return
dst
;
23
}