From 503143c355a18d79d7500f7b116b65b847c78880 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 20 Dec 2023 06:14:35 -0600 Subject: [PATCH] Update NOW.md --- docs/NOW.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/NOW.md b/docs/NOW.md index bd8f82e..986b7e0 100644 --- a/docs/NOW.md +++ b/docs/NOW.md @@ -61,6 +61,16 @@ Also note that regardless of whether or not the queue if full, if the size of a * if used, this method must be called *before* the instantiation of any SpanPoint objects. Example: `SpanPoint::setPassword("MyPassword");` * the same passphrase must be used among all devices that are communicating via SpanPoint, else the receiving device will not be able to decrypt messages it receives +* `static void setEncryption(boolean encrypt)` + + * this *optional* **class-level** method provides the ability to enable or disable encryption according to whether *encrypt* is set to *true* or *false* + * by default, encryption is normally enabled (using the password above) + * if used, this method must be called *before* the instantiation of any SpanPoint objects. Example: `SpanPoint::setEncryption(false);` disables encryption for all SpanPoint connections + * note that this is a global setting - if SpanPoint encryption is disabled on the main device, it must also be disabled on every remote device, else communication between devices will fail + * enabling/disabling encryption impacts that total number of SpanPoint connections that can be supported by the ESP32's ESP-NOW functionality: + * with encryption enabled, the ESP32 can support a maximum of 7 ESP-NOW links (i.e. 7 instances of SpanPoint) + * with encryption disabled, the ESP32 can support a maximum of 20 ESP-NOW links (i.e. 20 instances of SpanPoint) + * `static void setChannelMask(uint16_t mask)` * this *optional* **class-level** method changes the default channel bitmask from 0x3FFE (i.e. 0011 1111 1111 1110) to *mask*