The "en" Package
These routines are meant to provide strong encryption.
Library: karma
Link With: -lkarma
Functions
Functions
idea_status
en_idea_init (char key[EN_IDEA_KEY_SIZE], flag decrypt,
char init_vector[EN_IDEA_BLOCK_SIZE], flag clear)
This routine will initialise the IDEA cipher in Cipher Feed Back
mode for a stream of data. The stream is uni-directional.
Parameters:
- key :
The 16 byte IDEA key.
- decrypt :
If TRUE the stream is to be decrypted.
- init_vector :
The 8 byte initialisation vector.
- clear :
If TRUE the key and initialisation vector will be cleared after use
(highly recommended if they will not be needed again).
Returns: An IDEA cipher status which may be sebsequently used by
en_idea_cfb on success, else NULL.
Multithreading Level: Unsafe
void
en_idea_cfb (idea_status status, char *buffer, unsigned int length)
This routine will encrypt (or decrypt) a sequence of bytes using
the IDEA cipher in Cipher Feed Back mode.
Parameters:
- status :
The IDEA cipher status.
- buffer :
The data to encrypt. This is modified.
- length :
The number of bytes to encrypt (or decrypt).
Returns: Nothing.
Multithreading Level: Unsafe
void
en_idea_close (idea_status status)
This routine will clean up an IDEA cipher status, removing
sensitive key information.
Parameters:
- status :
The IDEA cipher status.
Returns: Nothing.
Multithreading Level: Unsafe
Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services