From b384a6a404bf6bd2c644d8c5634ccb396c0e0947 Mon Sep 17 00:00:00 2001 From: elpatron Date: Thu, 28 Aug 2025 09:42:45 +0200 Subject: [PATCH] Fix crypto implementation compilation errors --- src/crypto.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/crypto.cpp b/src/crypto.cpp index 68fd230..641a5c6 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -77,7 +77,7 @@ std::vector Crypto::decrypt(const std::vector& cip std::vector plaintext(ciphertext.size()); // Perform decryption and authentication - DecryptionResult result = decryption.DecryptAndVerify( + bool valid = decryption.DecryptAndVerify( plaintext.data(), auth_tag.data(), auth_tag.size(), @@ -89,13 +89,10 @@ std::vector Crypto::decrypt(const std::vector& cip ciphertext.size() ); - if(!result.isValidCoding) { + if(!valid) { throw std::runtime_error("Authentication failed during decryption"); } - // Resize to actual plaintext size - plaintext.resize(result.messageLength); - return plaintext; } catch(const Exception& e) {