mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-07-27 04:30:53 +00:00
Improve repeater reliability and build tooling
This commit is contained in:
+3
-1
@@ -11,6 +11,7 @@ Identity::Identity() {
|
||||
}
|
||||
|
||||
Identity::Identity(const char* pub_hex) {
|
||||
memset(pub_key, 0, sizeof(pub_key));
|
||||
Utils::fromHex(pub_key, PUB_KEY_SIZE, pub_hex);
|
||||
}
|
||||
|
||||
@@ -39,6 +40,7 @@ LocalIdentity::LocalIdentity() {
|
||||
memset(prv_key, 0, sizeof(prv_key));
|
||||
}
|
||||
LocalIdentity::LocalIdentity(const char* prv_hex, const char* pub_hex) : Identity(pub_hex) {
|
||||
memset(prv_key, 0, sizeof(prv_key));
|
||||
Utils::fromHex(prv_key, PRV_KEY_SIZE, prv_hex);
|
||||
}
|
||||
|
||||
@@ -140,4 +142,4 @@ void LocalIdentity::calcSharedSecret(uint8_t* secret, const uint8_t* other_pub_k
|
||||
ed25519_key_exchange(secret, other_pub_key, prv_key);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user