FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables

Functions

struct AVTWOFISHav_twofish_alloc (void)
 Allocate an AVTWOFISH context To free the struct: av_free(ptr) More...
 
int av_twofish_init (struct AVTWOFISH *ctx, const uint8_t *key, int key_bits)
 Initialize an AVTWOFISH context. More...
 
void av_twofish_crypt (struct AVTWOFISH *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_twofish_size
 

Detailed Description

Function Documentation

struct AVTWOFISH* av_twofish_alloc ( void  )

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

Definition at line 115 of file twofish.c.

Referenced by run_lavu_twofish().

int av_twofish_init ( struct AVTWOFISH ctx,
const uint8_t key,
int  key_bits 
)

Initialize an AVTWOFISH context.

Parameters
ctxan AVTWOFISH context
keya key of size ranging from 1 to 32 bytes used for encryption/decryption
key_bitsnumber of keybits: 128, 192, 256 If less than the required, padded with zeroes to nearest valid value; return value is 0 if key_bits is 128/192/256, -1 if less than 0, 1 otherwise

Definition at line 269 of file twofish.c.

Referenced by run_lavu_twofish().

void av_twofish_crypt ( struct AVTWOFISH 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 AVTWOFISH context
dstdestination array, can be equal to src
srcsource array, can be equal to dst
countnumber of 16 byte blocks iv initialization vector for CBC mode, NULL for ECB mode
decrypt0 for encryption, 1 for decryption

Definition at line 312 of file twofish.c.

Referenced by run_lavu_twofish().

Variable Documentation

const int av_twofish_size

Definition at line 120 of file twofish.c.