FFmpeg
Data Structures | Functions

Data Structures

struct  AVRC4
 

Functions

AVRC4av_rc4_alloc (void)
 Allocate an AVRC4 context. More...
 
int av_rc4_init (struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt)
 Initializes an AVRC4 context. More...
 
void av_rc4_crypt (struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 Encrypts / decrypts using the RC4 algorithm. More...
 

Detailed Description

Function Documentation

◆ av_rc4_alloc()

AVRC4* av_rc4_alloc ( void  )

Allocate an AVRC4 context.

Definition at line 29 of file rc4.c.

Referenced by ff_asfcrypt_dec(), and run_lavu_rc4().

◆ av_rc4_init()

int av_rc4_init ( struct AVRC4 d,
const uint8_t *  key,
int  key_bits,
int  decrypt 
)

Initializes an AVRC4 context.

Parameters
dpointer to the AVRC4 context
keybuffer containig the key
key_bitsmust be a multiple of 8
decrypt0 for encryption, 1 for decryption, currently has no effect
Returns
zero on success, negative value otherwise

Definition at line 34 of file rc4.c.

Referenced by ff_asfcrypt_dec(), ff_rtmpe_compute_secret_key(), and run_lavu_rc4().

◆ av_rc4_crypt()

void av_rc4_crypt ( struct AVRC4 d,
uint8_t *  dst,
const uint8_t *  src,
int  count,
uint8_t *  iv,
int  decrypt 
)

Encrypts / decrypts using the RC4 algorithm.

Parameters
dpointer to the AVRC4 context
countnumber of bytes
dstdestination array, can be equal to src
srcsource array, can be equal to dst, may be NULL
ivnot (yet) used for RC4, should be NULL
decrypt0 for encryption, 1 for decryption, not (yet) used

Definition at line 55 of file rc4.c.

Referenced by ff_asfcrypt_dec(), ff_rtmpe_update_keystream(), rtmpe_read(), rtmpe_write(), and run_lavu_rc4().