1 /* CC0 license (public domain) - see LICENSE file for details */
2 #ifndef CCAN_CRYPTO_XTEA_H
3 #define CCAN_CRYPTO_XTEA_H
4 /* Public domain - see LICENSE file for details */
9 * struct xtea_secret - secret to use for xtea encryption
10 * @u.u8: an unsigned char array.
11 * @u.u32: a 32-bit integer array.
12 * @u.u64: a 64-bit integer array.
14 * Other fields may be added to the union in future.
20 /* Array of uint32_t */
22 /* Array of uint64_t */
28 * xtea_encipher - encrypt a 64-bit value.
29 * @secret: the xtea secret
30 * @v: the 64 bit value
32 * Returns the 64-bit encrypted value: use xtea_decipher to decrypt.
34 uint64_t xtea_encipher(const struct xtea_secret *secret, uint64_t v);
37 * xtea_decipher - decrypt a 64-bit value.
38 * @secret: the xtea secret
39 * @e: the 64 bit encrypted value
41 * Returns the 64-bit decryptted value.
43 uint64_t xtea_decipher(const struct xtea_secret *secret, uint64_t e);
45 #endif /* CCAN_CRYPTO_SIPHASH24_H */