Added XTEA and Pearson Hashing.
Improved message encryption for RF24.
This commit is contained in:
+13
-1
@@ -40,7 +40,7 @@ MyMessage _msgTmp; // Buffer for temporary messages (acks and nonces among othe
|
||||
static coreConfig_t _coreConfig;
|
||||
|
||||
#if defined(DEBUG_OUTPUT_ENABLED)
|
||||
char _convBuf[MAX_PAYLOAD*2+1];
|
||||
char _convBuf[MAX_PAYLOAD*2+10];
|
||||
#endif
|
||||
|
||||
// Callback for transport=ok transition
|
||||
@@ -313,12 +313,24 @@ bool _sendRoute(MyMessage &message)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined (MY_MESSAGE_ENABLE_NONCE)
|
||||
uint16_t _nounce = 0;
|
||||
bool send(MyMessage &message, const bool enableAck) {
|
||||
return send(message, enableAck, _nounce++);
|
||||
}
|
||||
bool send(MyMessage &message, const bool enableAck, uint16_t nounce)
|
||||
#else
|
||||
bool send(MyMessage &message, const bool enableAck)
|
||||
#endif
|
||||
{
|
||||
message.sender = getNodeId();
|
||||
mSetCommand(message, C_SET);
|
||||
mSetRequestAck(message, enableAck);
|
||||
|
||||
#if defined(MY_MESSAGE_ENABLE_NONCE)
|
||||
message._nounce = nounce;
|
||||
#endif
|
||||
|
||||
#if defined(MY_REGISTRATION_FEATURE) && !defined(MY_GATEWAY_FEATURE)
|
||||
if (_coreConfig.nodeRegistered) {
|
||||
return _sendRoute(message);
|
||||
|
||||
Reference in New Issue
Block a user