From 17acdf73174c5a252340de9891f6eef7b823241b Mon Sep 17 00:00:00 2001 From: ccfelius Date: Thu, 7 Nov 2024 13:46:36 +0100 Subject: [PATCH] wip --- src/core/functions/scalar/encrypt.cpp | 16 +--------------- src/core/functions/scalar/struct_encrypt.cpp | 10 +--------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/core/functions/scalar/encrypt.cpp b/src/core/functions/scalar/encrypt.cpp index cfbc4e4..5c97156 100644 --- a/src/core/functions/scalar/encrypt.cpp +++ b/src/core/functions/scalar/encrypt.cpp @@ -219,24 +219,10 @@ void ExecuteEncryptStructExecutor(Vector &vector, Vector &result, idx_t size, Ex D_ASSERT(CheckEncryption(printable_encrypted_data, buffer_p, size, reinterpret_cast(name.GetData()), state) == 1); #endif - LogicalType struct_type = LogicalType::STRUCT({ - {"nonce", LogicalType::INTEGER}, - {"value", LogicalType::INTEGER} - }); - - struct_type[0] = 1; - struct_type[1] = - - // Use StructWriter to return struct result - StructWriter writer(result, struct_type); - writer.Write(0, nonce); - writer.Write(1, encrypted_data); - writer.Finalize(); - // this does not do anything for CTR and therefore can be skipped encryption_state->Finalize(buffer_p, 0, nullptr, 0); uint32_t nonce = 1; - return {nonce, encrypted_data}; + return encrypted_data; }); } diff --git a/src/core/functions/scalar/struct_encrypt.cpp b/src/core/functions/scalar/struct_encrypt.cpp index c250c13..23c3196 100644 --- a/src/core/functions/scalar/struct_encrypt.cpp +++ b/src/core/functions/scalar/struct_encrypt.cpp @@ -224,18 +224,10 @@ void ExecuteEncryptStructExecutor(Vector &vector, Vector &result, idx_t size, Ex {"value", LogicalType::INTEGER} }); - StructValue result; - - // Use StructWriter to return struct result - StructWriter writer(result, struct_type); - writer.Write(0, nonce); - writer.Write(1, encrypted_data); - writer.Finalize(); - // this does not do anything for CTR and therefore can be skipped encryption_state->Finalize(buffer_p, 0, nullptr, 0); uint32_t nonce = 1; - return {nonce, encrypted_data}; + return encrypted_data; }); }