CRYPTO_RC4

Syntax

#include <nitro/crypto.h>

void CRYPTO_RC4(const void* key, u32 key_len, void* data, u32 data_len);

Arguments

key Pointer to the byte sequence for the encryption/decryption key used with the RC4 algorithm.
key_len Length of the key specified by key. The length of the key must be 16 bytes or less; longer lengths are truncated to 16 bytes.
data Pointer to the target data to encrypt/decrypt with the RC4 algorithm.
data_len Specifies the length of the data specified by data.

Return Values

None.

Description

Performs encryption/decryption using the RC4 shared key encryption algorithm. The same function is used for both encryption and decryption in the RC4 algorithm.
Data stored within the data argument is directly processed and overwritten with the converted results.
This function is defined as an inline function that calls the CRYPTO_RC4Init and CRYPTO_RC4Encrypt functions sequentially.

For detailed information on using the RC4 algorithm, see Overview of Encryption Using RC4 Algorithm.

See Also

CRYPTO_RC4Encrypt, CRYPTO_RC4Init

Revision History

2008/02/25 Initial version.


CONFIDENTIAL