* ID hash 0x00 and 0xFF now reserved for future.

Этот коммит содержится в:
Scott Powell
2025-04-06 12:34:09 +10:00
родитель 86a3f592b9
Коммит 9498d2e824
4 изменённых файлов: 16 добавлений и 0 удалений
+4
Просмотреть файл
@@ -300,6 +300,10 @@ public:
((StdRNG *)getRNG())->begin(millis());
self_id = mesh::LocalIdentity(getRNG()); // create new random identity
int count = 0;
while (count < 10 && (self_id.pub_key[0] == 0x00 || self_id.pub_key[0] == 0xFF)) { // reserved id hashes
self_id = mesh::LocalIdentity(getRNG()); count++;
}
store.save("_main", self_id);
}