gcry_cipher_open gcry_cipher_close create and destroy an encryption context #include <gcrypt.h> GCRY_CIPHER_HD gcry_cipher_open int algo int mode unsigned in flags void gcry_cipher_close GCRY_CIPHER_HD h Description cipher functions gcry_cipher_open cipher functions gcry_cipher_close gcry_cipher_open creates the context required for most of the cipher functions. gcry_cipher_ctl gcry_cipher_setkey gcry_cipher_setiv gcry_cipher_setiv control cipher functions #include <gcrypt.h> int gcry_cipher_ctl GCRY_CIPHER_HD h int cmd void *buffer size_t buflen Description cipher functions gcry_cipher_ctl gcry_cipher_ctl controls various aspects of the cipher module and specific cipher contexts. A couple of macros may be used for convenience: gcry_cipher_setkey(h,k,l) gcry_cipher_setiv(h,k,l) gcry_cipher_sync(h) gcry_cipher_info return information about a cipher context #include <gcrypt.h> int gcry_cipher_info GCRY_CIPHER_HD h int what Description cipher functions gcry_cipher_info gcry_cipher_info is used to retrieve various information about a cipher context or the cipher module in general. Currently no information is available. gcry_cipher_algo_name return the name of a cipher algorithm #include <gcrypt.h> const char *gcry_cipher_algo_name int algo Description cipher functions gcry_cipher_algo_name gcry_cipher_algo_name returns a string with the name of the cipher algorithm algo. If the algorithm is not known or an other error occured, an empty string is return. This function will never return NULL. gcry_cipher_map_name return an algorithm identifier for string #include <gcrypt.h> int gcry_cipher_map_name const char *name Description cipher functions gcry_cipher_map_name gcry_cipher_map_name returns the algorithm identifier for the cipher algorithm described by the string name. If this algorith is not available 0 is returned. gcry_cipher_encrypt gcry_cipher_decrypt encrypt data or decrypt data #include <gcrypt.h> int gcry_cipher_encrypt GCRY_CIPHER_HD h unsigned char out size_t outsize unsigned char in size_t insize int gcry_cipher_decrypt GCRY_CIPHER_HD h unsigned char out size_t outsize unsigned char in size_t insize Description cipher functions gcry_cipher_encrypt cipher functions gcry_cipher_decrypt gcry_cipher_encrypt is used to encrypt the data. the complemetary function gcry_cipher_decrypt is be used to decrypt the data. The calling convention for both functions is the same. These functions can either work in place or with two buffers. Overlapping buffers are not allowed.