Go to the documentation of this file.
46 for (
i = 0;
i < 4;
i++)
53 int decrypt, uint8_t *iv)
57 uint32_t k0, k1, k2, k3;
71 v1 -= ((
v0 << 4) + k2) ^ (
v0 + sum) ^ ((
v0 >> 5) + k3);
72 v0 -= ((v1 << 4) + k0) ^ (v1 + sum) ^ ((v1 >> 5) + k1);
82 uint32_t sum = 0,
delta = 0x9E3779B9
U;
86 v0 += ((v1 << 4) + k0) ^ (v1 + sum) ^ ((v1 >> 5) + k1);
87 v1 += ((
v0 << 4) + k2) ^ (
v0 + sum) ^ ((
v0 >> 5) + k3);
96 uint8_t *iv,
int decrypt)
110 for (
i = 0;
i < 8;
i++)
static void tea_crypt_ecb(AVTEA *ctx, uint8_t *dst, const uint8_t *src, int decrypt, uint8_t *iv)
void av_tea_crypt(AVTEA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
Encrypt or decrypt a buffer using a previously initialized context.
Public header for libavutil TEA algorithm.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
#define i(width, name, range_min, range_max)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
void av_tea_init(AVTEA *ctx, const uint8_t key[16], int rounds)
Initialize an AVTEA context.
struct AVTEA * av_tea_alloc(void)
Allocate an AVTEA context To free the struct: av_free(ptr)