World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
+ Граф связей класса DES:

Классы

struct  AVDES
 

Определения типов

typedef struct AVDES AVDES
 

Функции

AVDESav_des_alloc (void)
 
int av_des_init (struct AVDES *d, const uint8_t *key, int key_bits, int decrypt)
 Initializes an AVDES context. Подробнее...
 
void av_des_crypt (struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 Encrypts / decrypts using the DES algorithm. Подробнее...
 
void av_des_mac (struct AVDES *d, uint8_t *dst, const uint8_t *src, int count)
 Calculates CBC-MAC using the DES algorithm. Подробнее...
 

Подробное описание

Типы

◆ AVDES

Функции

◆ av_des_alloc()

◆ av_des_init()

int av_des_init ( struct AVDES d,
const uint8_t key,
int  key_bits,
int  decrypt 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/des.h>

Initializes an AVDES context.

Аргументы
key_bitsmust be 64 or 192
decrypt0 for encryption/CBC-MAC, 1 for decryption
Возвращает
zero on success, negative value otherwise

◆ av_des_crypt()

void av_des_crypt ( struct AVDES d,
uint8_t dst,
const uint8_t src,
int  count,
uint8_t iv,
int  decrypt 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/des.h>

Encrypts / decrypts using the DES algorithm.

Аргументы
countnumber of 8 byte blocks
dstdestination array, can be equal to src, must be 8-byte aligned
srcsource array, can be equal to dst, must be 8-byte aligned, may be NULL
ivinitialization vector for CBC mode, if NULL then ECB will be used, must be 8-byte aligned
decrypt0 for encryption, 1 for decryption

◆ av_des_mac()

void av_des_mac ( struct AVDES d,
uint8_t dst,
const uint8_t src,
int  count 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/des.h>

Calculates CBC-MAC using the DES algorithm.

Аргументы
countnumber of 8 byte blocks
dstdestination array, can be equal to src, must be 8-byte aligned
srcsource array, can be equal to dst, must be 8-byte aligned, may be NULL