CRYPTO_RC4Init

C Specification


#include <nitroCrypto/crypto/rc4.h>

void  CRYPTO_RC4Init(
CRYPTORC4Context* context,
const void* key,
u32 key_len,
);

void  CRYPTO_RC4FastInit(
CRYPTORC4FastContext* context,
const void* key,
u32 key_len,
);
		

Arguments

context The CRYPTO_RC4Init function specifies the CRYPTORC4Context structure.
The CRYPTO_RC4FastInit function specifies the CRYPTORC4FastContext structure.
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_ptr. The length of the key must be 16 bytes or less; longer lengths are truncated to 16 bytes.

Return Values

None.

Description

Initializes the RC4 algorithm encryption structures and sets the encryption/decryption key.

The CRYPTO_RC4* and CRYPTO_RC4Fast* functions are the same, except that the CRYPTO_RC4Fast* functions are faster and require more stack memory. The CRYPTORC4Context structure used by the CRYPTO_RC4* functions is 260 bytes in size and the CRYPTORC4FastContext structure used by the CRYPTO_RC4Fast* functions is 1032 bytes in size. With regard to speed, CRYPTO_RC4FastEncrypt handles data of a sufficiently large size at approximately 1.5 times the normal processing speed.

See Also

CRYPTO_RC4Encrypt, CRYPTO_RC4

Revision History

02/24/2006 Switched from Crypt to Crypto.
2005/12/21 Initial version.

CONFIDENTIAL