1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-13 02:22:55 +03:00

- Use the new Crypto, TypeConversion and random() functionality added to the Arduino core, instead of the versions local to the mesh library.

- Rearrange class variables to minimize storage padding.

- Add protected getters for EspnowMeshBackend and MeshBackendBase components.

- Partially update README.md
This commit is contained in:
Anders
2020-05-18 22:09:34 +02:00
parent 595fb23128
commit f059e57322
34 changed files with 210 additions and 1573 deletions

View File

@ -114,7 +114,7 @@ namespace EspnowProtocolInterpreter
uint64_t createSessionKey()
{
uint64_t newSessionKey = MeshUtilityFunctions::randomUint64();
return usesEncryption(newSessionKey) ? newSessionKey : (newSessionKey | ((uint64_t)RANDOM_REG32) << 32 | uint64MSB); // TODO: Replace RANDOM_REG32 use with ESP.random().
return usesEncryption(newSessionKey) ? newSessionKey : (newSessionKey | ((uint64_t)ESP.random()) << 32 | uint64MSB);
}
macAndType_td createMacAndTypeValue(const uint64_t uint64Mac, const char messageType)