Refactor platform cryptography, add tests

This commit is contained in:
Jonathan Bennett
2024-08-10 22:38:05 -05:00
parent b573e0eacc
commit 1cfd5d12d2
11 changed files with 88 additions and 276 deletions

View File

@@ -480,7 +480,7 @@ meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p)
memcpy(p->encrypted.bytes, ScratchEncrypted, numbytes);
p->channel = 0;
} else {
crypto->encrypt(getFrom(p), p->id, numbytes, bytes);
crypto->encryptPacket(getFrom(p), p->id, numbytes, bytes);
memcpy(p->encrypted.bytes, bytes, numbytes);
}
#else