Fix standalone libtasn1.
[shishi.git] / crypto / memxor.c
blob5f073a6cd4851bf7459453d2c2ff01071c2f3099
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 #if HAVE_CONFIG_H
11 # include "config.h"
12 #endif
14 #include "memxor.h"
16 uint8_t *memxor(uint8_t *dst, const uint8_t *src, size_t n)
18 size_t i;
19 for (i = 0; i<n; i++)
20 dst[i] ^= src[i];
22 return dst;