TrustCore SDK NanoCrypto API reference  version 7.0
arc4.h File Reference

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...
 

Detailed Description

This file contains the NanoCrypto RC4 Internal API methods.

arc4.h

Function Documentation

◆ prepare_key()

MOC_EXTERN void prepare_key ( ubyte *  key_data_ptr,
sbyte4  key_data_len,
rc4_key *  key 
)

Computes the RC4 key schedule.

Parameters
key_data_ptrBuffer of the input key material.
key_data_lenThe length of the input key material.
keyPointer to the key to be prepared.

arc4.h

◆ rc4()

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.

Parameters
buffer_ptrThe buffer of data to be operated on in-place.
buffer_lenThe length in bytes of the data to be operated on. This length can be anything non-zero.
keyPointer to a prepared rc4 key.

arc4.h