Go to the documentation of this file.
22 #ifndef AVUTIL_AES_CTR_H
23 #define AVUTIL_AES_CTR_H
35 #define AES_CTR_KEY_SIZE (16)
36 #define AES_CTR_IV_SIZE (8)
void av_aes_ctr_set_random_iv(struct AVAESCTR *a)
Generate a random iv.
const uint8_t * av_aes_ctr_get_iv(struct AVAESCTR *a)
Get the current iv.
struct AVAESCTR * av_aes_ctr_alloc(void)
Allocate an AVAESCTR context.
int av_aes_ctr_init(struct AVAESCTR *a, const uint8_t *key)
Initialize an AVAESCTR context.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
void av_aes_ctr_set_iv(struct AVAESCTR *a, const uint8_t *iv)
Forcefully change the 8-byte iv.
void av_aes_ctr_set_full_iv(struct AVAESCTR *a, const uint8_t *iv)
Forcefully change the "full" 16-byte iv, including the counter.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
void av_aes_ctr_free(struct AVAESCTR *a)
Release an AVAESCTR context.
void av_aes_ctr_increment_iv(struct AVAESCTR *a)
Increment the top 64 bit of the iv (performed after each frame)
void av_aes_ctr_crypt(struct AVAESCTR *a, uint8_t *dst, const uint8_t *src, int size)
Process a buffer using a previously initialized context.