Delete unused code (#9350)

* Delete unused code

CryptoEngine::clearKeys() is not used in the code base, therefore this
cleanup removes the code. It might give casual reviewers the impression,
that keys are wiped.

Since the code uses memset() which might be optimized away by the
compiler, using the code might not even cause the memory
to be wiped.

* Update CryptoEngine.cpp

Fix stray newline, this is the only thing that I can come up with that might confuse the linter.

---------

Co-authored-by: Jason P <applewiz@mac.com>
This commit is contained in:
Eric Sesterhenn
2026-01-24 12:19:19 +01:00
committed by GitHub
parent 6b88d37b73
commit 7221fc4d4b
2 changed files with 0 additions and 6 deletions

View File

@@ -61,11 +61,6 @@ bool CryptoEngine::regeneratePublicKey(uint8_t *pubKey, uint8_t *privKey)
return true;
}
#endif
void CryptoEngine::clearKeys()
{
memset(public_key, 0, sizeof(public_key));
memset(private_key, 0, sizeof(private_key));
}
/**
* Encrypt a packet's payload using a key generated with Curve25519 and SHA256