Filters for Compression and Encryption
[Input/Output]

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_free (codec_t *codec)
 Dispose all the resources allocated to the supplied codec.
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 166 of file cipher_cyassl.c.

int codec_free ( codec_t *  codec  ) 

Dispose all the resources allocated to the supplied codec

Parameters:
codec the codec_t object to be disposed
Returns:
always successful, i.e. 0

Definition at line 24 of file codec.c.

Referenced by io_codecs_remove().

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 75 of file null.c.


←Products
Copyright © 2005-2012 - KoanLogic S.r.l. - All rights reserved