Remove WITH_ESPNOW_BRIDGE_SECRET definition from platformio.ini files and update documentation to use _prefs->bridge_secret

This commit is contained in:
João Brázio 2025-10-03 00:23:09 +01:00
parent 8edcb46a28
commit e48f3a58ae
No known key found for this signature in database
GPG key ID: 56A1490716A324DD
21 changed files with 4 additions and 33 deletions

View file

@ -6,10 +6,6 @@
#ifdef WITH_ESPNOW_BRIDGE
#ifndef WITH_ESPNOW_BRIDGE_SECRET
#error WITH_ESPNOW_BRIDGE_SECRET must be defined to use ESPNowBridge
#endif
/**
* @brief Bridge implementation using ESP-NOW protocol for packet transport
*
@ -36,11 +32,11 @@
*
* Configuration:
* - Define WITH_ESPNOW_BRIDGE to enable this bridge
* - Define WITH_ESPNOW_BRIDGE_SECRET with a string to set the network encryption key
* - Define _prefs->bridge_secret with a string to set the network encryption key
*
* Network Isolation:
* Multiple independent mesh networks can coexist by using different
* WITH_ESPNOW_BRIDGE_SECRET values. Packets encrypted with a different key will
* _prefs->bridge_secret values. Packets encrypted with a different key will
* fail the checksum validation and be discarded.
*/
class ESPNowBridge : public BridgeBase {
@ -76,8 +72,8 @@ private:
/**
* Performs XOR encryption/decryption of data
* Used to isolate different mesh networks
*
* Uses WITH_ESPNOW_BRIDGE_SECRET as the key in a simple XOR operation.
*
* Uses _prefs->bridge_secret as the key in a simple XOR operation.
* The same operation is used for both encryption and decryption.
* While not cryptographically secure, it provides basic network isolation.
*