FFmpeg
Data Structures | Macros | Functions

Data Structures

struct  AVBlowfish
 

Macros

#define AV_BF_ROUNDS   16
 

Functions

AVBlowfishav_blowfish_alloc (void)
 Allocate an AVBlowfish context. More...
 
void av_blowfish_init (struct AVBlowfish *ctx, const uint8_t *key, int key_len)
 Initialize an AVBlowfish context. More...
 
void av_blowfish_crypt_ecb (struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr, int decrypt)
 Encrypt or decrypt a buffer using a previously initialized context. More...
 
void av_blowfish_crypt (struct AVBlowfish *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...
 

Detailed Description

Macro Definition Documentation

◆ AV_BF_ROUNDS

#define AV_BF_ROUNDS   16

Definition at line 33 of file blowfish.h.

Function Documentation

◆ av_blowfish_alloc()

AVBlowfish* av_blowfish_alloc ( void  )

Allocate an AVBlowfish context.

Definition at line 304 of file blowfish.c.

Referenced by main(), and run_lavu_blowfish().

◆ av_blowfish_init()

void av_blowfish_init ( struct AVBlowfish ctx,
const uint8_t key,
int  key_len 
)

Initialize an AVBlowfish context.

Parameters
ctxan AVBlowfish context
keya key
key_lenlength of the key

Definition at line 309 of file blowfish.c.

Referenced by main(), rtmpe9_sig(), and run_lavu_blowfish().

◆ av_blowfish_crypt_ecb()

void av_blowfish_crypt_ecb ( struct AVBlowfish ctx,
uint32_t *  xl,
uint32_t *  xr,
int  decrypt 
)

Encrypt or decrypt a buffer using a previously initialized context.

Parameters
ctxan AVBlowfish context
xlleft four bytes halves of input to be encrypted
xrright four bytes halves of input to be encrypted
decrypt0 for encryption, 1 for decryption

Definition at line 344 of file blowfish.c.

Referenced by av_blowfish_crypt(), av_blowfish_init(), main(), and rtmpe9_sig().

◆ av_blowfish_crypt()

void av_blowfish_crypt ( struct AVBlowfish 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 AVBlowfish 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, if NULL ECB will be used
decrypt0 for encryption, 1 for decryption

Definition at line 375 of file blowfish.c.

Referenced by run_lavu_blowfish(), and test_blowfish().