![]() |
TrustCore SDK NanoCrypto API reference
version 7.0
|
Header file for the NanoCrypto RC4 Internal APIs. More...
Go to the source code of this file.
Functions | |
MOC_EXTERN void | prepare_key (ubyte *key_data_ptr, sbyte4 key_data_len, rc4_key *key) |
Computes the RC4 key schedule. More... | |
MOC_EXTERN void | rc4 (ubyte *buffer_ptr, sbyte4 buffer_len, rc4_key *key) |
Performs the RC4 cipher operation. More... | |
This file contains the NanoCrypto RC4 Internal API methods.
MOC_EXTERN void prepare_key | ( | ubyte * | key_data_ptr, |
sbyte4 | key_data_len, | ||
rc4_key * | key | ||
) |
Computes the RC4 key schedule.
key_data_ptr | Buffer of the input key material. |
key_data_len | The length of the input key material. |
key | Pointer to the key to be prepared. |
MOC_EXTERN void rc4 | ( | ubyte * | buffer_ptr, |
sbyte4 | buffer_len, | ||
rc4_key * | key | ||
) |
Performs the RC4 cipher operation. RC4 is a stream cipher and the encryption operation is the same as the decryption operation.
buffer_ptr | The buffer of data to be operated on in-place. |
buffer_len | The length in bytes of the data to be operated on. This length can be anything non-zero. |
key | Pointer to a prepared rc4 key. |