12 #ifndef RHEncryptedDriver_h
13 #define RHEncryptedDriver_h
15 #include <RHGenericDriver.h>
16 #ifdef RH_ENABLE_ENCRYPTION_MODULE
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;
virtual uint8_t headerId()
Definition: RHEncryptedDriver.h:174
virtual uint8_t headerFrom()
Definition: RHEncryptedDriver.h:170
virtual bool waitAvailableTimeout(uint16_t timeout)
Definition: RHEncryptedDriver.h:107
void setCADTimeout(unsigned long cad_timeout)
Definition: RHGenericDriver.cpp:209
void setMode(RHMode mode)
Sets the operating mode of the transport.
Definition: RHEncryptedDriver.h:191
int16_t lastRssi()
Definition: RHEncryptedDriver.h:184
virtual bool waitPacketSent(uint16_t timeout)
Definition: RHEncryptedDriver.h:102
void setCADTimeout(unsigned long cad_timeout)
Definition: RHEncryptedDriver.h:116
virtual uint8_t maxMessageLength()=0
virtual bool available()=0
virtual bool waitAvailableTimeout(uint16_t timeout)
Definition: RHGenericDriver.cpp:38
virtual uint16_t txGood()
Definition: RHGenericDriver.cpp:204
virtual bool init()
Definition: RHEncryptedDriver.h:56
Virtual Driver to encrypt/decrypt data. Can be used with any other RadioHead driver.
Definition: RHEncryptedDriver.h:44
virtual uint8_t headerFlags()
Definition: RHGenericDriver.cpp:149
virtual bool isChannelActive()
Definition: RHGenericDriver.cpp:98
virtual void setThisAddress(uint8_t thisAddress)
Definition: RHEncryptedDriver.h:136
RHEncryptedDriver(RHGenericDriver &driver, BlockCipher &blockcipher)
Definition: RHEncryptedDriver.cpp:10
Abstract base class for a RadioHead driver.
Definition: RHGenericDriver.h:41
virtual uint8_t headerId()
Definition: RHGenericDriver.cpp:144
RHMode
Defines different operating modes for the transport hardware.
Definition: RHGenericDriver.h:48
virtual void setPromiscuous(bool promiscuous)
Definition: RHGenericDriver.cpp:103
virtual uint8_t headerFrom()
Definition: RHGenericDriver.cpp:139
virtual void setThisAddress(uint8_t thisAddress)
Definition: RHGenericDriver.cpp:108
virtual void setHeaderId(uint8_t id)
Definition: RHGenericDriver.cpp:123
virtual bool isChannelActive()
Definition: RHEncryptedDriver.h:125
virtual uint8_t headerTo()
Definition: RHEncryptedDriver.h:166
virtual int16_t lastRssi()
Definition: RHGenericDriver.cpp:154
virtual bool sleep()
Definition: RHGenericDriver.cpp:169
virtual void setPromiscuous(bool promiscuous)
Definition: RHEncryptedDriver.h:162
virtual uint16_t rxGood()
Definition: RHGenericDriver.cpp:199
virtual bool recv(uint8_t *buf, uint8_t *len)=0
virtual bool send(const uint8_t *data, uint8_t len)=0
virtual uint16_t rxBad()
Definition: RHEncryptedDriver.h:206
virtual bool send(const uint8_t *data, uint8_t len)
Definition: RHEncryptedDriver.cpp:51
virtual uint16_t rxBad()
Definition: RHGenericDriver.cpp:194
virtual bool sleep()
Definition: RHEncryptedDriver.h:199
virtual void setHeaderFlags(uint8_t set, uint8_t clear=RH_FLAGS_APPLICATION_SPECIFIC)
Definition: RHEncryptedDriver.h:157
virtual void setHeaderTo(uint8_t to)
Definition: RHGenericDriver.cpp:113
virtual uint8_t headerFlags()
Definition: RHEncryptedDriver.h:178
virtual uint16_t txGood()
Definition: RHEncryptedDriver.h:216
virtual bool recv(uint8_t *buf, uint8_t *len)
Definition: RHEncryptedDriver.cpp:17
virtual void setHeaderFrom(uint8_t from)
Definition: RHGenericDriver.cpp:118
virtual bool init()
Definition: RHGenericDriver.cpp:23
virtual void setHeaderFrom(uint8_t from)
Definition: RHEncryptedDriver.h:144
virtual uint8_t headerTo()
Definition: RHGenericDriver.cpp:134
virtual void setHeaderId(uint8_t id)
Definition: RHEncryptedDriver.h:148
virtual void setHeaderTo(uint8_t to)
Definition: RHEncryptedDriver.h:140
virtual bool available()
Definition: RHEncryptedDriver.h:64
virtual uint16_t rxGood()
Definition: RHEncryptedDriver.h:211
virtual uint8_t maxMessageLength()
Definition: RHEncryptedDriver.cpp:141
virtual void setHeaderFlags(uint8_t set, uint8_t clear=RH_FLAGS_APPLICATION_SPECIFIC)
Definition: RHGenericDriver.cpp:128
virtual bool waitPacketSent()
Definition: RHEncryptedDriver.h:96
RHMode mode()
Definition: RHEncryptedDriver.h:188
virtual bool waitPacketSent()
Definition: RHGenericDriver.cpp:52
virtual bool waitCAD()
Definition: RHEncryptedDriver.h:111
virtual RHMode mode()
Definition: RHGenericDriver.cpp:159
virtual void setMode(RHMode mode)
Sets the operating mode of the transport.
Definition: RHGenericDriver.cpp:164
virtual bool waitCAD()
Definition: RHGenericDriver.cpp:72