12#ifndef RHEncryptedDriver_h
13#define RHEncryptedDriver_h
15#include <RHGenericDriver.h>
16#if defined(RH_ENABLE_ENCRYPTION_MODULE) || defined(DOXYGEN)
17#include <BlockCipher.h>
22#define STRICT_CONTENT_LEN
75 virtual bool recv(uint8_t* buf, uint8_t* len);
87 virtual bool send(
const uint8_t* data, uint8_t len);
223 BlockCipher& _blockcipher;
228 size_t blockSize = 0;
229 uint8_t *inputBlock = NULL;
233 CipherBlocks _cipheringBlocks;
248#error "You have included RHEncryptedDriver.h, but not enabled RH_ENABLE_ENCRYPTION_MODULE in RadioHead.h"
Virtual Driver to encrypt/decrypt data. Can be used with any other RadioHead driver.
Definition RHEncryptedDriver.h:45
virtual uint16_t txGood()
Definition RHEncryptedDriver.h:216
void setCADTimeout(unsigned long cad_timeout)
Definition RHEncryptedDriver.h:116
virtual uint8_t headerId()
Definition RHEncryptedDriver.h:174
virtual void setPromiscuous(bool promiscuous)
Definition RHEncryptedDriver.h:162
int16_t lastRssi()
Definition RHEncryptedDriver.h:184
virtual bool send(const uint8_t *data, uint8_t len)
virtual bool sleep()
Definition RHEncryptedDriver.h:199
RHMode mode()
Definition RHEncryptedDriver.h:188
virtual bool available()
Definition RHEncryptedDriver.h:64
virtual uint8_t maxMessageLength()
virtual bool recv(uint8_t *buf, uint8_t *len)
virtual bool waitCAD()
Definition RHEncryptedDriver.h:111
RHEncryptedDriver(RHGenericDriver &driver, BlockCipher &blockcipher)
void setMode(RHMode mode)
Sets the operating mode of the transport.
Definition RHEncryptedDriver.h:191
virtual uint8_t headerTo()
Definition RHEncryptedDriver.h:166
virtual bool waitAvailableTimeout(uint16_t timeout)
Definition RHEncryptedDriver.h:107
virtual void setHeaderFlags(uint8_t set, uint8_t clear=RH_FLAGS_APPLICATION_SPECIFIC)
Definition RHEncryptedDriver.h:157
virtual uint16_t rxGood()
Definition RHEncryptedDriver.h:211
virtual uint16_t rxBad()
Definition RHEncryptedDriver.h:206
virtual uint8_t headerFlags()
Definition RHEncryptedDriver.h:178
virtual uint8_t headerFrom()
Definition RHEncryptedDriver.h:170
virtual void setHeaderTo(uint8_t to)
Definition RHEncryptedDriver.h:140
virtual void setHeaderId(uint8_t id)
Definition RHEncryptedDriver.h:148
virtual void setThisAddress(uint8_t thisAddress)
Definition RHEncryptedDriver.h:136
virtual void setHeaderFrom(uint8_t from)
Definition RHEncryptedDriver.h:144
virtual bool isChannelActive()
Definition RHEncryptedDriver.h:125
virtual bool waitPacketSent(uint16_t timeout)
Definition RHEncryptedDriver.h:102
virtual bool waitPacketSent()
Definition RHEncryptedDriver.h:96
virtual bool init()
Definition RHEncryptedDriver.h:56
Abstract base class for a RadioHead driver.
Definition RHGenericDriver.h:42
virtual uint16_t rxBad()
Definition RHGenericDriver.cpp:200
virtual uint8_t headerFlags()
Definition RHGenericDriver.cpp:155
virtual void setHeaderTo(uint8_t to)
Definition RHGenericDriver.cpp:119
virtual void setPromiscuous(bool promiscuous)
Definition RHGenericDriver.cpp:109
virtual bool available()=0
virtual bool init()
Definition RHGenericDriver.cpp:23
void setCADTimeout(unsigned long cad_timeout)
Definition RHGenericDriver.cpp:215
virtual void setHeaderFrom(uint8_t from)
Definition RHGenericDriver.cpp:124
virtual void setHeaderId(uint8_t id)
Definition RHGenericDriver.cpp:129
virtual void setThisAddress(uint8_t thisAddress)
Definition RHGenericDriver.cpp:114
virtual uint16_t rxGood()
Definition RHGenericDriver.cpp:205
virtual uint16_t txGood()
Definition RHGenericDriver.cpp:210
virtual uint8_t headerTo()
Definition RHGenericDriver.cpp:140
virtual bool waitPacketSent()
Definition RHGenericDriver.cpp:58
RHMode
Defines different operating modes for the transport hardware.
Definition RHGenericDriver.h:49
virtual RHMode mode()
Definition RHGenericDriver.cpp:165
virtual uint8_t headerId()
Definition RHGenericDriver.cpp:150
virtual uint8_t headerFrom()
Definition RHGenericDriver.cpp:145
virtual bool waitAvailableTimeout(uint16_t timeout, uint16_t polldelay=0)
Definition RHGenericDriver.cpp:42
virtual bool sleep()
Definition RHGenericDriver.cpp:175
virtual void setMode(RHMode mode)
Sets the operating mode of the transport.
Definition RHGenericDriver.cpp:170
virtual int16_t lastRssi()
Definition RHGenericDriver.cpp:160
virtual bool waitCAD()
Definition RHGenericDriver.cpp:78
virtual void setHeaderFlags(uint8_t set, uint8_t clear=RH_FLAGS_APPLICATION_SPECIFIC)
Definition RHGenericDriver.cpp:134
virtual bool isChannelActive()
Definition RHGenericDriver.cpp:104