mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-22 13:15:39 +08:00
fix: Check correct key length for AFV encryption
This commit is contained in:
@@ -35,6 +35,7 @@ namespace BlackCore::Afv::Crypto
|
||||
template <typename T>
|
||||
static QByteArray serialize(const QString &channelTag, CryptoDtoMode mode, const QByteArray &transmitKey, uint sequenceToBeSent, T dto)
|
||||
{
|
||||
Q_ASSERT_X(transmitKey.size() == crypto_aead_chacha20poly1305_IETF_KEYBYTES, Q_FUNC_INFO, "");
|
||||
const CryptoDtoHeaderDto header = { channelTag.toStdString(), sequenceToBeSent, mode };
|
||||
|
||||
QBuffer headerBuffer;
|
||||
|
||||
Reference in New Issue
Block a user