Miam-Player  0.8.0
A nice music player
aes_ctr.h File Reference
#include <stdint.h>
#include "attributes.h"
#include "version.h"

Go to the source code of this file.

Macros

#define AES_CTR_KEY_SIZE   (16)
 
#define AES_CTR_IV_SIZE   (8)
 

Functions

struct AVAESCTR * av_aes_ctr_alloc (void)
 
int av_aes_ctr_init (struct AVAESCTR *a, const uint8_t *key)
 
void av_aes_ctr_free (struct AVAESCTR *a)
 
void av_aes_ctr_crypt (struct AVAESCTR *a, uint8_t *dst, const uint8_t *src, int size)
 
const uint8_t * av_aes_ctr_get_iv (struct AVAESCTR *a)
 
void av_aes_ctr_set_random_iv (struct AVAESCTR *a)
 
void av_aes_ctr_set_iv (struct AVAESCTR *a, const uint8_t *iv)
 
void av_aes_ctr_increment_iv (struct AVAESCTR *a)
 

Macro Definition Documentation

◆ AES_CTR_IV_SIZE

#define AES_CTR_IV_SIZE   (8)

◆ AES_CTR_KEY_SIZE

#define AES_CTR_KEY_SIZE   (16)

Function Documentation

◆ av_aes_ctr_alloc()

struct AVAESCTR* av_aes_ctr_alloc ( void  )

Allocate an AVAESCTR context.

◆ av_aes_ctr_crypt()

void av_aes_ctr_crypt ( struct AVAESCTR *  a,
uint8_t *  dst,
const uint8_t *  src,
int  size 
)

Process a buffer using a previously initialized context.

Parameters
dstdestination array, can be equal to src
srcsource array, can be equal to dst
sizethe size of src and dst

◆ av_aes_ctr_free()

void av_aes_ctr_free ( struct AVAESCTR *  a)

Release an AVAESCTR context.

◆ av_aes_ctr_get_iv()

const uint8_t* av_aes_ctr_get_iv ( struct AVAESCTR *  a)

Get the current iv

◆ av_aes_ctr_increment_iv()

void av_aes_ctr_increment_iv ( struct AVAESCTR *  a)

Increment the top 64 bit of the iv (performed after each frame)

◆ av_aes_ctr_init()

int av_aes_ctr_init ( struct AVAESCTR *  a,
const uint8_t *  key 
)

Initialize an AVAESCTR context.

Parameters
keyencryption key, must have a length of AES_CTR_KEY_SIZE

◆ av_aes_ctr_set_iv()

void av_aes_ctr_set_iv ( struct AVAESCTR *  a,
const uint8_t *  iv 
)

Forcefully change the iv

◆ av_aes_ctr_set_random_iv()

void av_aes_ctr_set_random_iv ( struct AVAESCTR *  a)

Generate a random iv