My Project
|
Functions | |
int | wc_Arc4Process (Arc4 *arc4, byte *out, const byte *in, word32 length) |
This function encrypts an input message from the buffer in, placing the ciphertext in the output buffer out, or decrypts a ciphertext from the buffer in, placing the plaintext in the output buffer out, using ARC4 encryption. This function is used for both encryption and decryption. Before this method may be called, one must first initialize the ARC4 structure using wc_Arc4SetKey. More... | |
int | wc_Arc4SetKey (Arc4 *arc4, const byte *key, word32 length) |
This function sets the key for a ARC4 object, initializing it for use as a cipher. It should be called before using it for encryption with wc_Arc4Process. More... | |
int wc_Arc4Process | ( | Arc4 * | arc4, |
byte * | out, | ||
const byte * | in, | ||
word32 | length | ||
) |
This function encrypts an input message from the buffer in, placing the ciphertext in the output buffer out, or decrypts a ciphertext from the buffer in, placing the plaintext in the output buffer out, using ARC4 encryption. This function is used for both encryption and decryption. Before this method may be called, one must first initialize the ARC4 structure using wc_Arc4SetKey.
arc4 | pointer to the ARC4 structure used to process the message |
out | pointer to the output buffer in which to store the processed message |
in | pointer to the input buffer containing the message to process |
length | length of the message to process |
Example
int wc_Arc4SetKey | ( | Arc4 * | arc4, |
const byte * | key, | ||
word32 | length | ||
) |
This function sets the key for a ARC4 object, initializing it for use as a cipher. It should be called before using it for encryption with wc_Arc4Process.
arc4 | pointer to an arc4 structure to be used for encryption |
key | key with which to initialize the arc4 structure |
length | length of the key used to initialize the arc4 structure |
Example