/* This file is in the public domain. */ #include "alg-util.h" /* * Utilities for algorithm code. See alg-util.h for interface * contracts; the code here is commented only when it seems * appropriate to add something beyond the interface contract. */ void xor_block(const void *iv1, const void *iv2, void *ov, int len) { const unsigned char *i1; const unsigned char *i2; unsigned char *o; i1 = iv1; i2 = iv2; o = ov; for (;len>0;len--) *o++ = *i1++ ^ *i2++; }