6 static const uint32_t DELTA = 0x9e3779b9;
7 #define MX ((((z >> 5) ^ (y << 2)) + ((y >> 3) ^ (z << 4))) ^ ((sum ^ y) + (k[(p ^ e) & 7] ^ z))) 9 void encrypt(uint32_t *v,
size_t n,
const uint32_t *k) {
10 uint32_t z,
y, sum, e;
12 size_t q = 6 + 52 / n;
18 for (p = 0; p != n - 1; p++) {
27 void decrypt(uint32_t *v,
size_t n,
const uint32_t *k) {
28 uint32_t z,
y, sum, e;
30 size_t q = 6 + 52 / n;
35 for (p = n - 1; p != 0; p--) {
void encrypt(uint32_t *v, size_t n, const uint32_t *k)
Encrypt a block of data in-place using XXTEA algorithm with 256-bit key.
void decrypt(uint32_t *v, size_t n, const uint32_t *k)
Decrypt a block of data in-place using XXTEA algorithm with 256-bit key.
Implementation of SPI Controller mode.