FFmpeg
Loading...
Searching...
No Matches
aes_ctr.c File Reference
#include <string.h>
#include "aes_ctr.h"
#include "aes.h"
#include "aes_internal.h"
#include "intreadwrite.h"
#include "macros.h"
#include "mem.h"
#include "random_seed.h"

Go to the source code of this file.

Data Structures

struct  AVAESCTR
 

Macros

#define AES_BLOCK_SIZE   (16)
 

Functions

struct AVAESCTRav_aes_ctr_alloc (void)
 Allocate an AVAESCTR context.
 
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.
 
const uint8_t * av_aes_ctr_get_iv (struct AVAESCTR *a)
 Get the current iv.
 
void av_aes_ctr_set_random_iv (struct AVAESCTR *a)
 Generate a random iv.
 
int av_aes_ctr_init (struct AVAESCTR *a, const uint8_t *key)
 Initialize an AVAESCTR context.
 
void av_aes_ctr_free (struct AVAESCTR *a)
 Release an AVAESCTR context.
 
static void av_aes_ctr_increment_be64 (uint8_t *counter)
 
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 count)
 Process a buffer using a previously initialized context.
 

Macro Definition Documentation

◆ AES_BLOCK_SIZE

#define AES_BLOCK_SIZE   (16)

Definition at line 32 of file aes_ctr.c.

Referenced by av_aes_ctr_crypt().

Function Documentation

◆ av_aes_ctr_increment_be64()

static void av_aes_ctr_increment_be64 ( uint8_t * counter)
inlinestatic

Definition at line 89 of file aes_ctr.c.

Referenced by av_aes_ctr_crypt(), and av_aes_ctr_increment_iv().