libmcrypt:

To use libmcrypt in your program include lcrypt.h. This file defines
these algorithms:
# define BLOWFISH 0
# define DES 1 
# define TripleDES 2
# define ThreeWAY 3
# define GOST 4
# define SAFER64 6
# define SAFER128 7

Also these functions:

int get_block_size(int algorithm);
 Returns the block size of the given algorithm in bytes.
 Algorithm is one of the above.

int get_key_size(int algorithm); 
 Returns the key size of the given algorithm in bytes.

int init_mcrypt(const int algorithm, void * key,const int lenofkey);
 Starts encryption, and returns a thread descriptor.

int mcrypt(int thread, void *plaintext);
int mdecrypt(int thread, void *plaintext);
 Using the thread descriptor you can now use these functions. Plaintext
 should have block_size length.

int end_mcrypt(int td);
 Finishes (so it clears memory) encryption/decryption for the given
 thread descriptor.
