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

Функции

struct AVTWOFISH * av_twofish_alloc (void)
 
int av_twofish_init (struct AVTWOFISH *ctx, const uint8_t *key, int key_bits)
 
void av_twofish_crypt (struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 

Переменные

const int av_twofish_size
 

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

Функции

◆ av_twofish_alloc()

struct AVTWOFISH* av_twofish_alloc ( void  )

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

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

◆ av_twofish_init()

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

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

Initialize an AVTWOFISH context.

Аргументы
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

◆ av_twofish_crypt()

void av_twofish_crypt ( struct AVTWOFISH *  ctx,
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/twofish.h>

Encrypt or decrypt a buffer using a previously initialized context

Аргументы
ctxan AVTWOFISH context
dstdestination array, can be equal to src
srcsource array, can be equal to dst
countnumber of 16 byte blocks @paran iv initialization vector for CBC mode, NULL for ECB mode
decrypt0 for encryption, 1 for decryption

Переменные

◆ av_twofish_size