MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / xorKey

Function xorKey

TactilityCore/Source/crypt/Crypt.cpp:101–105  ·  view source on GitHub ↗

* Performs XOR on 2 memory regions and stores it in a third * @param[in] inLeft input buffer for XOR * @param[in] inRight second input buffer for XOR * @param[out] out output buffer for result of XOR * @param[in] length data length (all buffers must be at least this size) */

Source from the content-addressed store, hash-verified

99 * @param[in] length data length (all buffers must be at least this size)
100 */
101static void xorKey(const uint8_t* inLeft, const uint8_t* inRight, uint8_t* out, size_t length) {
102 for (int i = 0; i < length; ++i) {
103 out[i] = inLeft[i] ^ inRight[i];
104 }
105}
106
107/**
108 * Combines a stored key and a hardware key into a single reliable key value.

Callers 1

getKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected