MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / xorbuf

Function xorbuf

src/cryptlib/misc.cpp:7–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "words.h"
6
7void 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
18void xorbuf(byte *output, const byte *input, const byte *mask, unsigned int count)
19{

Callers 2

X917RNGMethod · 0.85
GetByteMethod · 0.85

Calls 1

XorWordsFunction · 0.85

Tested by

no test coverage detected