FFmpeg
Files | Data Structures | Functions

Files

file  xtea.c
 XTEA 32-bit implementation.
 

Data Structures

struct  AVXTEA
 

Functions

AVXTEAav_xtea_alloc (void)
 Allocate an AVXTEA context. More...
 
void av_xtea_init (struct AVXTEA *ctx, const uint8_t key[16])
 Initialize an AVXTEA context. More...
 
void av_xtea_le_init (struct AVXTEA *ctx, const uint8_t key[16])
 Initialize an AVXTEA context. More...
 
void av_xtea_crypt (struct AVXTEA *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, in big endian format. More...
 
void av_xtea_le_crypt (struct AVXTEA *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, in little endian format. More...
 

Detailed Description

Function Documentation

◆ av_xtea_alloc()

AVXTEA* av_xtea_alloc ( void  )

Allocate an AVXTEA context.

Definition at line 37 of file xtea.c.

Referenced by main(), and run_lavu_xtea().

◆ av_xtea_init()

void av_xtea_init ( struct AVXTEA ctx,
const uint8_t  key[16] 
)

Initialize an AVXTEA context.

Parameters
ctxan AVXTEA context
keya key of 16 bytes used for encryption/decryption, interpreted as big endian 32 bit numbers

Definition at line 42 of file xtea.c.

Referenced by main(), and run_lavu_xtea().

◆ av_xtea_le_init()

void av_xtea_le_init ( struct AVXTEA ctx,
const uint8_t  key[16] 
)

Initialize an AVXTEA context.

Parameters
ctxan AVXTEA context
keya key of 16 bytes used for encryption/decryption, interpreted as little endian 32 bit numbers

Definition at line 50 of file xtea.c.

Referenced by main(), and rtmpe8_sig().

◆ av_xtea_crypt()

void av_xtea_crypt ( struct AVXTEA 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, in big endian format.

Parameters
ctxan AVXTEA 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 then ECB will be used
decrypt0 for encryption, 1 for decryption

Definition at line 243 of file xtea.c.

Referenced by main(), and run_lavu_xtea().

◆ av_xtea_le_crypt()

void av_xtea_le_crypt ( struct AVXTEA 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, in little endian format.

Parameters
ctxan AVXTEA 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 then ECB will be used
decrypt0 for encryption, 1 for decryption

Definition at line 249 of file xtea.c.

Referenced by main(), and rtmpe8_sig().