mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-27 13:52:14 +00:00
WIP update
Implemented AES. Implemented AES-CBC. Implemented HKDF. Implemented HMAC. Implemented PKCS7. Implemented Fernet. Added extensive logging and successfully tested ability to encrypt and decrypt a packet.
This commit is contained in:
1 parent
4b062aa485
commit
f9e3a22911
28 files changed
+1487
-328
No files matched your search
+12
-3
@@ -19,8 +19,6 @@
|
||||
#include <map>
|
||||
//#include <sstream>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
// Let's define an app name. We'll use this for all
|
||||
// destinations we create. Since this basic example
|
||||
// is part of a range of example utilities, we'll put
|
||||
@@ -68,9 +66,20 @@ void setup() {
|
||||
|
||||
//destination.announce(RNS::bytesFromString(fruits[rand() % 7]));
|
||||
// test path
|
||||
destination.announce(RNS::bytesFromString(fruits[rand() % 7]), true, nullptr, RNS::bytesFromString("test_tag"));
|
||||
//destination.announce(RNS::bytesFromString(fruits[rand() % 7]), true, nullptr, RNS::bytesFromString("test_tag"));
|
||||
// test packet send
|
||||
RNS::Packet send_packet = destination.announce(RNS::bytesFromString(fruits[rand() % 7]));
|
||||
//RNS::Packet packet = destination.announce(RNS::bytesFromString(fruits[rand() % 7]), false, nullptr, RNS::Bytes::NONE, false);
|
||||
// 23.9% (+0.8%)
|
||||
|
||||
RNS::extreme("Test send_packet packet: " + send_packet.toString());
|
||||
|
||||
// test packet receive
|
||||
RNS::Packet recv_packet(RNS::Destination::NONE, send_packet._raw);
|
||||
RNS::extreme("Test recv_packet packet: " + recv_packet.toString());
|
||||
|
||||
destination.receive(recv_packet);
|
||||
|
||||
//zdestination.set_proof_strategy(RNS::Destination::PROVE_ALL);
|
||||
|
||||
//zannounce_handler = ExampleAnnounceHandler(
|
||||
|
||||
Reference in new issue
Block a user