FFmpeg 7.1.1
Loading...
Searching...
No Matches

Data Structures

struct  AVDES
 

Functions

AVDESav_des_alloc (void)
 Allocate an AVDES context.
 
int av_des_init (struct AVDES *d, const uint8_t *key, int key_bits, int decrypt)
 Initializes an AVDES context.
 
void av_des_crypt (struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 Encrypts / decrypts using the DES algorithm.
 
void av_des_mac (struct AVDES *d, uint8_t *dst, const uint8_t *src, int count)
 Calculates CBC-MAC using the DES algorithm.
 

Detailed Description

Function Documentation

◆ av_des_alloc()

AVDES * av_des_alloc ( void )

Allocate an AVDES context.

◆ av_des_init()

int av_des_init ( struct AVDES * d,
const uint8_t * key,
int key_bits,
int decrypt )

Initializes an AVDES context.

Parameters
dpointer to a AVDES structure to initialize
keypointer to the key to use
key_bitsmust be 64 or 192
decrypt0 for encryption/CBC-MAC, 1 for decryption
Returns
zero on success, negative value otherwise

◆ av_des_crypt()

void av_des_crypt ( struct AVDES * d,
uint8_t * dst,
const uint8_t * src,
int count,
uint8_t * iv,
int decrypt )

Encrypts / decrypts using the DES algorithm.

Parameters
dpointer to the AVDES structure
dstdestination array, can be equal to src, must be 8-byte aligned
srcsource array, can be equal to dst, must be 8-byte aligned, may be NULL
countnumber of 8 byte blocks
ivinitialization vector for CBC mode, if NULL then ECB will be used, must be 8-byte aligned
decrypt0 for encryption, 1 for decryption

◆ av_des_mac()

void av_des_mac ( struct AVDES * d,
uint8_t * dst,
const uint8_t * src,
int count )

Calculates CBC-MAC using the DES algorithm.

Parameters
dpointer to the AVDES structure
dstdestination array, can be equal to src, must be 8-byte aligned
srcsource array, can be equal to dst, must be 8-byte aligned, may be NULL
countnumber of 8 byte blocks