FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
AES
Crypto and Hashing

Functions

struct AVAESav_aes_alloc (void)
 Allocate an AVAES context.
 
int av_aes_init (struct AVAES *a, const uint8_t *key, int key_bits, int decrypt)
 Initialize an AVAES context.
 
void av_aes_crypt (struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 Encrypt or decrypt a buffer using a previously initialized context.
 

Variables

const int av_aes_size
 

Detailed Description

Function Documentation

struct AVAES* av_aes_alloc ( void  )
read

Allocate an AVAES context.

Definition at line 45 of file aes.c.

Referenced by crypto_open2(), ff_srtp_set_crypto(), mxf_decrypt_triplet(), and run_lavu_aes128().

int av_aes_init ( struct AVAES a,
const uint8_t key,
int  key_bits,
int  decrypt 
)

Initialize an AVAES context.

Parameters
key_bits128, 192 or 256
decrypt0 for encryption, 1 for decryption

Definition at line 194 of file aes.c.

Referenced by crypto_open2(), ff_srtp_decrypt(), ff_srtp_encrypt(), ff_srtp_set_crypto(), mxf_decrypt_triplet(), and run_lavu_aes128().

void av_aes_crypt ( struct AVAES a,
uint8_t dst,
const uint8_t src,
int  count,
uint8_t iv,
int  decrypt 
)

Encrypt or decrypt a buffer using a previously initialized context.

Parameters
countnumber of 16 byte blocks
dstdestination array, can be equal to src
srcsource array, can be equal to dst
ivinitialization vector for CBC mode, if NULL then ECB will be used
decrypt0 for encryption, 1 for decryption

Definition at line 143 of file aes.c.

Referenced by crypto_close(), crypto_read(), crypto_write(), encrypt_counter(), mxf_decrypt_triplet(), and run_lavu_aes128().

Variable Documentation

const int av_aes_size

Definition at line 43 of file aes.c.