FFmpeg
[フレーム]
Macros | Functions
AES-CTR
libavutil » Crypto and Hashing

Macros

#define  AES_CTR_KEY_SIZE   (16)
 
#define  AES_CTR_IV_SIZE   (8)
 

Functions

struct AVAESCTRav_aes_ctr_alloc (void)
  Allocate an AVAESCTR context. More...
 
int  av_aes_ctr_init (struct AVAESCTR *a, const uint8_t *key)
  Initialize an AVAESCTR context. More...
 
void  av_aes_ctr_free (struct AVAESCTR *a)
  Release an AVAESCTR context. More...
 
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. More...
 
const uint8_t *  av_aes_ctr_get_iv (struct AVAESCTR *a)
  Get the current iv. More...
 
  Generate a random iv. More...
 
void  av_aes_ctr_set_iv (struct AVAESCTR *a, const uint8_t *iv)
  Forcefully change the 8-byte iv. More...
 
void  av_aes_ctr_set_full_iv (struct AVAESCTR *a, const uint8_t *iv)
  Forcefully change the "full" 16-byte iv, including the counter. More...
 
  Increment the top 64 bit of the iv (performed after each frame) More...
 

Detailed Description

Macro Definition Documentation

AES_CTR_KEY_SIZE

#define AES_CTR_KEY_SIZE   (16)

Definition at line 35 of file aes_ctr.h.

AES_CTR_IV_SIZE

#define AES_CTR_IV_SIZE   (8)

Definition at line 36 of file aes_ctr.h.

Function Documentation

av_aes_ctr_alloc()

struct AVAESCTR* av_aes_ctr_alloc ( void  )

Allocate an AVAESCTR context.

Definition at line 41 of file aes_ctr.c.

Referenced by cenc_scheme_decrypt(), cens_scheme_decrypt(), ff_mov_cenc_init(), and main().

av_aes_ctr_init()

int av_aes_ctr_init ( struct AVAESCTRa,
const uint8_t *  key 
)

Initialize an AVAESCTR context.

Parameters
a The AVAESCTR context to initialize
key encryption key, must have a length of AES_CTR_KEY_SIZE

Definition at line 74 of file aes_ctr.c.

Referenced by cenc_scheme_decrypt(), cens_scheme_decrypt(), ff_mov_cenc_init(), and main().

av_aes_ctr_free()

void av_aes_ctr_free ( struct AVAESCTRa )

Release an AVAESCTR context.

Parameters
a The AVAESCTR context

Definition at line 84 of file aes_ctr.c.

Referenced by ff_mov_cenc_free(), main(), and mov_free_stream_context().

av_aes_ctr_crypt()

void av_aes_ctr_crypt ( struct AVAESCTRa,
uint8_t *  dst,
const uint8_t *  src,
int  size 
)

Process a buffer using a previously initialized context.

Parameters
a The AVAESCTR context
dst destination array, can be equal to src
src source array, can be equal to dst
size the size of src and dst

Definition at line 102 of file aes_ctr.c.

Referenced by cenc_scheme_decrypt(), cens_scheme_decrypt(), main(), and mov_cenc_write_encrypted().

av_aes_ctr_get_iv()

const uint8_t* av_aes_ctr_get_iv ( struct AVAESCTRa )

Get the current iv.

Definition at line 59 of file aes_ctr.c.

Referenced by main(), and mov_cenc_start_packet().

av_aes_ctr_set_random_iv()

void av_aes_ctr_set_random_iv ( struct AVAESCTRa )

Generate a random iv.

Definition at line 64 of file aes_ctr.c.

Referenced by ff_mov_cenc_init(), and main().

av_aes_ctr_set_iv()

void av_aes_ctr_set_iv ( struct AVAESCTRa,
const uint8_t *  iv 
)

Forcefully change the 8-byte iv.

Definition at line 46 of file aes_ctr.c.

Referenced by av_aes_ctr_set_random_iv(), and main().

av_aes_ctr_set_full_iv()

void av_aes_ctr_set_full_iv ( struct AVAESCTRa,
const uint8_t *  iv 
)

Forcefully change the "full" 16-byte iv, including the counter.

Definition at line 53 of file aes_ctr.c.

Referenced by cenc_scheme_decrypt(), cens_scheme_decrypt(), and main().

av_aes_ctr_increment_iv()

void av_aes_ctr_increment_iv ( struct AVAESCTRa )

Increment the top 64 bit of the iv (performed after each frame)

Definition at line 95 of file aes_ctr.c.

Referenced by mov_cenc_end_packet().


Generated on Tue Nov 18 2025 19:24:19 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /