| 5 | #include "words.h" |
| 6 | |
| 7 | void xorbuf(byte *buf, const byte *mask, unsigned int count) |
| 8 | { |
| 9 | if (((ptr_size_type)buf | (ptr_size_type)mask | count) % WORD_SIZE == 0) |
| 10 | XorWords((word *)buf, (const word *)mask, count/WORD_SIZE); |
| 11 | else |
| 12 | { |
| 13 | for (unsigned int i=0; i<count; i++) |
| 14 | buf[i] ^= mask[i]; |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | void xorbuf(byte *output, const byte *input, const byte *mask, unsigned int count) |
| 19 | { |