Fix.
[shishi.git] / crypto / memxor.c
blobb3a8ae22680776755f14e2b18136f21d3a5d777b
1 /* memxor.c
3 * $Id$
4 */
6 /* XOR LEN bytes starting at SRCADDR onto DESTADDR. Result undefined
7 if the source overlaps with the destination.
8 Return DESTADDR. */
10 #include "memxor.h"
12 uint8_t *memxor(uint8_t *dst, const uint8_t *src, size_t n)
14 size_t i;
15 for (i = 0; i<n; i++)
16 dst[i] ^= src[i];
18 return dst;