Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
Class that implements RC5 encryption. More...
#include <cs_RC5.h>
Public Member Functions | |
void | init () |
Initialize the class, reads from State. More... | |
bool | decrypt (uint16_t *inBuf, uint16_t inBufSize, uint16_t *outBuf, uint16_t outBufSize) |
Decrypt data with RC5. More... | |
Static Public Member Functions | |
static RC5 & | getInstance () |
Use static variant of singleton, no dynamic memory allocation. More... | |
Private Member Functions | |
RC5 () | |
RC5 (RC5 const &) | |
void | operator= (RC5 const &) |
bool | initKey (EncryptionAccessLevel accessLevel) |
Expands the key of given access level. More... | |
bool | prepareKey (uint8_t *key, uint8_t keyLength) |
Expands key into round subkey words, which are cached. More... | |
Private Attributes | |
uint16_t | _subKeys [RC5_NUM_SUBKEYS] |
The round subkey words. More... | |
Class that implements RC5 encryption.
|
private |
bool RC5::decrypt | ( | uint16_t * | inBuf, |
uint16_t | inBufSize, | ||
uint16_t * | outBuf, | ||
uint16_t | outBufSize | ||
) |
Decrypt data with RC5.
[in] | inBuf | Input buffer with the encrypted data. |
[in] | inBufSize | Size of the input buffer in bytes. |
[out] | outBuf | Output buffer to decrypt to. |
[in] | outBufSize | Size of the output buffer in bytes. |
|
inlinestatic |
Use static variant of singleton, no dynamic memory allocation.
void RC5::init | ( | ) |
Initialize the class, reads from State.
|
private |
Expands the key of given access level.
|
private |
|
private |
Expands key into round subkey words, which are cached.
|
private |
The round subkey words.