* 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) */
| 99 | * @param[in] length data length (all buffers must be at least this size) |
| 100 | */ |
| 101 | static 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. |