Function

int cdk_file_armor (CDK_HD hd , const char * file , const char * output )

Arguments

CDK_HD hd
Handle
const char * file
Name of the file to protect.
const char * output
Output filename.

 

Function

int cdk_file_dearmor (const char * file , const char * output )

Arguments

const char * file
Name of the file to unprotect.
const char * output
Output filename.

 

Function

int cdk_stream_encrypt (CDK_HD hd , CDK_STRLIST remusr , CDK_STREAM inp , CDK_STREAM out )

Arguments

CDK_HD hd
Handle
CDK_STRLIST remusr
List of recipients
CDK_STREAM inp
Input stream handle
CDK_STREAM out
Output stream handle

Description


 

Function

int cdk_file_encrypt (CDK_HD hd , CDK_STRLIST remusr , const char * file , const char * output )

Arguments

CDK_HD hd
Handle
CDK_STRLIST remusr
List of recipient
const char * file
Input file
const char * output
Output file

 

Function

int cdk_file_decrypt (CDK_HD hd , const char * file , const char * output )

Arguments

CDK_HD hd
Handle.
const char * file
Name of the file to decrypt.
const char * output
Output filename.

Description


 

Function

int cdk_keygen_set_prefs (CDK_KEYGEN_CTX hd , int type , const byte * array , size_t n )

Arguments

CDK_KEYGEN_CTX hd
the preference type
int type
const byte * array
one-octet array with algorithm numers
size_t n

 

Function

void cdk_keygen_set_name (CDK_KEYGEN_CTX hd , const char * name )

Arguments

CDK_KEYGEN_CTX hd
the keygen object
const char * name
name

Description


 

Function

int cdk_keygen_set_algo_info (CDK_KEYGEN_CTX hd , int type , int algo , int bits )

Arguments

CDK_KEYGEN_CTX hd
the keygen object.
int type
key type (primary=0, subkey=1)
int algo
algorithm compliant with rfc2440
int bits
lengt of the key in bits

 

Function

void cdk_keygen_set_mdc_feature (CDK_KEYGEN_CTX hd , int val )

Arguments

CDK_KEYGEN_CTX hd
keygen object
int val
boolean( yes=1, no=0)

Description


 

Function

void cdk_keygen_set_expire_date (CDK_KEYGEN_CTX hd , int type , long timestamp )

Arguments

CDK_KEYGEN_CTX hd
keygen object
int type
key type( 0=primary, 1=seconardy)
long timestamp
the date the key should expire

 

Function

int cdk_keygen_start (CDK_KEYGEN_CTX hd )

Arguments

CDK_KEYGEN_CTX hd
the keygen object

 

Function

int cdk_keygen_save (CDK_KEYGEN_CTX hd , const char * pub , const char * sec )

Arguments

CDK_KEYGEN_CTX hd
the keygen object
const char * pub
name of the file to store the public key
const char * sec
name of the file to store the secret key

 

Function

void cdk_keygen_free (CDK_KEYGEN_CTX hd )

Arguments

CDK_KEYGEN_CTX hd
the keygen object

 

Function

int cdk_keygen_new (CDK_KEYGEN_CTX * r_hd )

Arguments

CDK_KEYGEN_CTX * r_hd
the new object

 

Function

int cdk_keyserver_recv_key (const char * host , int port , const byte * keyid , int kid_type , CDK_KBNODE * r_knode )

Arguments

const char * host
URL or hostname of the keyserver
int port
The used port
const byte * keyid
KeyID of the key to retrieve
int kid_type
KeyID type( long, short, fingerprint)
CDK_KBNODE * r_knode
The key that was found wrapped in a KBNODE struct

 

Function

const char * cdk_strerror (int ec )

Arguments

int ec
the error number

 

Function

void cdk_set_malloc_hooks (void * (*new_alloc_func )

Arguments

void * (*new_alloc_func

 

Function

void cdk_set_log_handler (CDK_LOG_FNC logfnc , void * opaque )

Arguments

CDK_LOG_FNC logfnc
the function pointer
void * opaque
a private values for the function

 

Function

void cdk_set_log_level (int lvl )

Arguments

int lvl
the level

 

Function

int cdk_handle_new (CDK_HD * r_ctx )

Arguments

CDK_HD * r_ctx
context to store the handle

 

Function

void cdk_handle_set_keydb (CDK_HD hd , CDK_KEYDB_HD db )

Arguments

CDK_HD hd
session handle
CDK_KEYDB_HD db
the database handle

Description


 

Function

void cdk_handle_set_callback (CDK_HD hd , void (*cb )

Arguments

CDK_HD hd
the handle
void (*cb

 

Function

void cdk_handle_free (CDK_HD hd )

Arguments

CDK_HD hd
the handle

 

Function

const char * cdk_check_version (const char * req_version )

Arguments

const char * req_version
The requested version

Description


 

Function

int cdk_file_sign (CDK_HD hd , CDK_STRLIST locusr , CDK_STRLIST remusr , const char * file , const char * output , int sigmode , int encryptflag )

Arguments

CDK_HD hd
CDK_STRLIST locusr
List of userid which should be used for signing
CDK_STRLIST remusr
If encrypt is valid, the list of recipients
const char * file
Name of the input file
const char * output
Name of the output file
int sigmode
Signature mode
int encryptflag

 

Function

int cdk_stream_open (const char * file , CDK_STREAM * ret_s )

Arguments

const char * file
The file to open
CDK_STREAM * ret_s
The new STREAM object

 

Function

int cdk_stream_new (const char * file , CDK_STREAM * ret_s )

Arguments

const char * file
The name of the new file
CDK_STREAM * ret_s
The new STREAM object

 

Function

int cdk_stream_create (const char * file , CDK_STREAM * ret_s )

Arguments

const char * file
the filename
CDK_STREAM * ret_s
the object

Description


 

Function

int cdk_stream_close (CDK_STREAM s )

Arguments

CDK_STREAM s
The STREAM object.

Description


 

Function

int cdk_stream_eof (CDK_STREAM s )

Arguments

CDK_STREAM s
The STREAM object.

Description


 

Function

unsigned cdk_stream_get_length (CDK_STREAM s )

Arguments

CDK_STREAM s
The STREAM object.

Description


 

Function

int cdk_stream_filter_disable (CDK_STREAM s , int type )

Arguments

CDK_STREAM s
The STREAM object
int type
The numberic filter ID.

 

Function

int cdk_stream_read (CDK_STREAM s , void * buf , size_t count )

Arguments

CDK_STREAM s
The STREAM object.
void * buf
The buffer to insert the readed bytes.
size_t count
Request so much bytes.

Description


 

Function

int cdk_stream_write (CDK_STREAM s , const void * buf , size_t count )

Arguments

CDK_STREAM s
The STREAM object
const void * buf
The buffer with the values to write.
size_t count
The size of the buffer.

Description