summaryrefslogtreecommitdiff
path: root/src/libstddjb/bitarray_xor.c
blob: dde5dc77cb56b1e7e7b7c67cb0cba398b9fbefdc (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <sys/types.h>
#include <skalibs/bitarray.h>

void bitarray_xor (unsigned char *c, unsigned char const *a, unsigned char const *b, size_t n)
{
  size_t len = bitarray_div8(n) ;
  register size_t i = 0 ;
  for (; i < len ; i++) c[i] = a[i] ^ b[i] ;
}