Loading...
Searching...
No Matches
xor.h File Reference

XOR coding definitions. More...

Detailed Description

XOR coding definitions.

Author
Benjamin Valentin benja.nosp@m.min..nosp@m.valen.nosp@m.tin@.nosp@m.ml-pa.nosp@m..com

Definition in file xor.h.

#include <stddef.h>
#include <stdint.h>
+ Include dependency graph for xor.h:

Go to the source code of this file.

Macros

#define CONFIG_CODING_XOR_CHECK_BYTES   3U
 Number of payload bytes per parity byte.
 
#define CODING_XOR_PARITY_LEN(in)
 Get the size of the needed parity buffer for a given payload size.
 

Functions

void coding_xor_generate (void *data, size_t len, uint8_t *parity)
 Generate parity and mix data buffer.
 
bool coding_xor_recover (void *data, size_t len, uint8_t *parity, uint8_t *blocks, size_t block_size, bool recover_parity)
 Restore and unmix buffer.