FFmpeg
Functions | Variables

Functions

struct AVCAST5av_cast5_alloc (void)
 Allocate an AVCAST5 context To free the struct: av_free(ptr) More...
 
int av_cast5_init (struct AVCAST5 *ctx, const uint8_t *key, int key_bits)
 Initialize an AVCAST5 context. More...
 
void av_cast5_crypt (struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, int decrypt)
 Encrypt or decrypt a buffer using a previously initialized context, ECB mode only. More...
 
void av_cast5_crypt2 (struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 Encrypt or decrypt a buffer using a previously initialized context. More...
 

Variables

const int av_cast5_size
 

Detailed Description

Function Documentation

◆ av_cast5_alloc()

struct AVCAST5* av_cast5_alloc ( void  )

Allocate an AVCAST5 context To free the struct: av_free(ptr)

Definition at line 451 of file cast5.c.

Referenced by main(), and run_lavu_cast128().

◆ av_cast5_init()

int av_cast5_init ( struct AVCAST5 ctx,
const uint8_t key,
int  key_bits 
)

Initialize an AVCAST5 context.

Parameters
ctxan AVCAST5 context
keya key of 5,6,...16 bytes used for encryption/decryption
key_bitsnumber of keybits: possible are 40,48,...,128
Returns
0 on success, less than 0 on failure

Definition at line 456 of file cast5.c.

Referenced by main(), and run_lavu_cast128().

◆ av_cast5_crypt()

void av_cast5_crypt ( struct AVCAST5 ctx,
uint8_t dst,
const uint8_t src,
int  count,
int  decrypt 
)

Encrypt or decrypt a buffer using a previously initialized context, ECB mode only.

Parameters
ctxan AVCAST5 context
dstdestination array, can be equal to src
srcsource array, can be equal to dst
countnumber of 8 byte blocks
decrypt0 for encryption, 1 for decryption

Definition at line 496 of file cast5.c.

Referenced by main(), and run_lavu_cast128().

◆ av_cast5_crypt2()

void av_cast5_crypt2 ( struct AVCAST5 ctx,
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
ctxan AVCAST5 context
dstdestination array, can be equal to src
srcsource array, can be equal to dst
countnumber of 8 byte blocks
ivinitialization vector for CBC mode, NULL for ECB mode
decrypt0 for encryption, 1 for decryption

Definition at line 476 of file cast5.c.

Referenced by main().

Variable Documentation

◆ av_cast5_size

const int av_cast5_size

Definition at line 77 of file cast5.c.