35 size_t package_len,
void *buffer,
size_t *encrypt_len);
37 size_t package_len,
size_t *decrypt_len);
void * ksnDecryptPackage(ksnCryptClass *kcr, void *package, size_t package_len, size_t *decrypt_len)
Decrypt received package.
Definition: crypt.c:278
struct ksnCryptClass ksnCryptClass
ksnetCrypt Class data
int key_len
Definition: crypt.h:21
ksnetCrypt Class data
Definition: crypt.h:17
int ksnCheckEncrypted(void *package, size_t package_len)
Simple check if the packet is encrypted.
Definition: crypt.c:323
unsigned char * key
Definition: crypt.h:20
int blocksize
Definition: crypt.h:22
ksnCryptClass * ksnCryptInit(void *ke)
Module initialize.
Definition: crypt.c:30
#define BLOCK_SIZE
File: crypt.h Author: Kirill Scherba kirill@scherba.ru
Definition: crypt.h:11
void ksnCryptDestroy(ksnCryptClass *kcr)
Module destroy.
Definition: crypt.c:78
void * ksnEncryptPackage(ksnCryptClass *kcr, void *package, size_t package_len, void *buffer, size_t *encrypt_len)
Encrypt KSNet package.
Definition: crypt.c:232
void * ke
Definition: crypt.h:23
unsigned char iv[BLOCK_SIZE+1]
Definition: crypt.h:19