From e735faf7558aff457432a14bdfde893b33d4d311 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 28 Jun 2021 22:12:01 +0100 Subject: Protocol: call the encryptor once before sending data --- src/mbedTLS++/AesCfb128Encryptor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mbedTLS++/AesCfb128Encryptor.cpp') diff --git a/src/mbedTLS++/AesCfb128Encryptor.cpp b/src/mbedTLS++/AesCfb128Encryptor.cpp index 7c2ae8b2b..2a08ef28e 100644 --- a/src/mbedTLS++/AesCfb128Encryptor.cpp +++ b/src/mbedTLS++/AesCfb128Encryptor.cpp @@ -43,8 +43,8 @@ void cAesCfb128Encryptor::Init(const Byte a_Key[16], const Byte a_IV[16]) -void cAesCfb128Encryptor::ProcessData(std::byte * const a_EncryptedOut, const std::byte * const a_PlainIn, size_t a_Length) +void cAesCfb128Encryptor::ProcessData(std::byte * const a_PlainIn, const size_t a_Length) { ASSERT(IsValid()); // Must Init() first - mbedtls_aes_crypt_cfb8(&m_Aes, MBEDTLS_AES_ENCRYPT, a_Length, m_IV, reinterpret_cast(a_PlainIn), reinterpret_cast(a_EncryptedOut)); + mbedtls_aes_crypt_cfb8(&m_Aes, MBEDTLS_AES_ENCRYPT, a_Length, m_IV, reinterpret_cast(a_PlainIn), reinterpret_cast(a_PlainIn)); } -- cgit v1.2.3