COSA
An Object-Oriented Platform for Arduino Programming
RC4 Class Reference

#include <RC4.hh>

Collaboration diagram for RC4:
Collaboration graph

Public Member Functions

 RC4 (const void *key, size_t len)
 
void restart (const void *key, size_t len)
 
char encrypt (char c)
 
void encrypt (void *buf, size_t n)
 
void encrypt (void *dest, const void *src, size_t n)
 
char decrypt (char c)
 
void decrypt (void *buf, size_t n)
 
void decrypt (void *dest, const void *src, size_t n)
 

Detailed Description

Constructor & Destructor Documentation

RC4::RC4 ( const void *  key,
size_t  len 
)
inline

Construct RC4 cipher for given key and length.

Parameters
[in]keypointer to key.
[in]lenlength of key in bytes.

Definition at line 39 of file RC4.hh.

Member Function Documentation

char RC4::decrypt ( char  c)
inline

Decrypt the given character.

Parameters
[in]ccharacter to decode.
Returns
decoded character.

Definition at line 97 of file RC4.hh.

void RC4::decrypt ( void *  buf,
size_t  n 
)
inline

Decrypt the given buffer.

Parameters
[in]bufbuffer pointer.
[in]nnumber of bytes.

Definition at line 107 of file RC4.hh.

void RC4::decrypt ( void *  dest,
const void *  src,
size_t  n 
)
inline

Decrypt the given src buffer to the dest buffer.

Parameters
[in]destbuffer pointer.
[in]srcbuffer pointer.
[in]nnumber of bytes.

Definition at line 119 of file RC4.hh.

char RC4::encrypt ( char  c)
inline

Encrypt the given character.

Parameters
[in]ccharacter to encode.
Returns
encoded character.

Definition at line 56 of file RC4.hh.

void RC4::encrypt ( void *  buf,
size_t  n 
)
inline

Encrypt the given buffer.

Parameters
[in]bufbuffer pointer.
[in]nnumber of bytes.

Definition at line 73 of file RC4.hh.

void RC4::encrypt ( void *  dest,
const void *  src,
size_t  n 
)
inline

Encrypt the given src buffer to the dest buffer.

Parameters
[in]destbuffer pointer.
[in]srcbuffer pointer.
[in]nnumber of bytes.

Definition at line 85 of file RC4.hh.

void RC4::restart ( const void *  key,
size_t  len 
)

Restart the given key and length.

Parameters
[in]keypointer to key.
[in]lenlength of key in bytes.

Definition at line 24 of file RC4.cpp.


The documentation for this class was generated from the following files: