FFmpeg
Macros | Functions | Variables
tea.c File Reference
#include <stdio.h>
#include "libavutil/common.h"
#include "libavutil/tea.h"

Go to the source code of this file.

Macros

#define TEA_NUM_TESTS   4
 

Functions

static void test_tea (struct AVTEA *ctx, uint8_t *dst, const uint8_t *src, const uint8_t *ref, int len, uint8_t *iv, int dir, const char *test)
 
int main (void)
 

Variables

static const uint8_t tea_test_key [TEA_NUM_TESTS][16]
 
static const uint8_t tea_test_pt [TEA_NUM_TESTS][8]
 
static const uint8_t tea_test_ct [TEA_NUM_TESTS][8]
 

Macro Definition Documentation

◆ TEA_NUM_TESTS

#define TEA_NUM_TESTS   4

Definition at line 30 of file tea.c.

Function Documentation

◆ test_tea()

static void test_tea ( struct AVTEA ctx,
uint8_t dst,
const uint8_t src,
const uint8_t ref,
int  len,
uint8_t iv,
int  dir,
const char *  test 
)
static

Definition at line 62 of file tea.c.

Referenced by main().

◆ main()

int main ( void  )

Definition at line 80 of file tea.c.

Variable Documentation

◆ tea_test_key

const uint8_t tea_test_key[TEA_NUM_TESTS][16]
static
Initial value:
= {
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
},
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
}
}

Definition at line 33 of file tea.c.

Referenced by main().

◆ tea_test_pt

const uint8_t tea_test_pt[TEA_NUM_TESTS][8]
static
Initial value:
= {
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 },
{ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 },
{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }
}

Definition at line 48 of file tea.c.

Referenced by main().

◆ tea_test_ct

const uint8_t tea_test_ct[TEA_NUM_TESTS][8]
static
Initial value:
= {
{ 0x41, 0xEA, 0x3A, 0x0A, 0x94, 0xBA, 0xA9, 0x40 },
{ 0x6A, 0x2F, 0x9C, 0xF3, 0xFC, 0xCF, 0x3C, 0x55 },
{ 0xDE, 0xB1, 0xC0, 0xA2, 0x7E, 0x74, 0x5D, 0xB3 },
{ 0x12, 0x6C, 0x6B, 0x92, 0xC0, 0x65, 0x3A, 0x3E }
}

Definition at line 55 of file tea.c.

Referenced by main().