Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

Codec_t


Typedefs

typedef codec_gzip_s codec_gzip_t
typedef codec_null_s codec_null_t

Functions

int codec_cipher_create (int op, const EVP_CIPHER *cipher, unsigned char *key, unsigned char *iv, codec_t **pcc)
 Create a cipher codec_t object.
int codec_gzip_create (int op, codec_t **piz)
 Create a cipher codec_t object.
int codec_null_create (codec_t **pcn)
 Create a cipher codec_t object.

Function Documentation

int codec_cipher_create int  op,
const EVP_CIPHER *  cipher,
unsigned char *  key,
unsigned char *  iv,
codec_t **  pcc
 

Create a cipher codec_t object at *pcc suitable for encryption or decryption (depending on op). The cipher, key and iv parameters hold the algorithm, key and initialisation vector respectively, used for the data transforms.

Parameters:
op one of CIPHER_ENCRYPT or CIPHER_DECRYPT
cipher an OpenSSL EVP_CIPHER object
key the encryption/decryption key
iv the initialisation vector
pcc the created codec as a value-result arguement
Returns:
0 on success, ~0 otherwise

Definition at line 172 of file cipher.c.

int codec_gzip_create int  op,
codec_t **  piz
 

Create a gzip codec_t object at *piz suitable for compression or decompression (depending on op).

Parameters:
op one of GZIP_COMPRESS or GZIP_UNCOMPRESS
piz the created codec as a value-result arguement
Returns:
0 on success, ~0 otherwise

Definition at line 142 of file gzip.c.

int codec_null_create codec_t **  pcn  ) 
 

Create a null codec_t object at *pcn.

Parameters:
pcn the created codec as a value-result arguement
Returns:
0 on success, ~0 otherwise

Definition at line 74 of file null.c.