Adding functions for Decrypt sequence on API server#173
Conversation
avalerio-tkd
commented
Dec 2, 2025
- Add the header of methods for the Decryption sequence.
- Reorganized the code to group related methods together.
- Reorganized the code to group related methods together.
| // Decompress the encrypted bytes | ||
| auto decompressed_encrypted_bytes = Decompress(ciphertext, encrypted_compression_); | ||
|
|
||
| // Decrypt the typed list and level bytes |
There was a problem hiding this comment.
technically we need the Type of the column in here (so we know how to make sense of the decrypted bytes for each value) - but that can wait for a later iteration. This is good for demo/discussion purposes.
There was a problem hiding this comment.
Yes, this will be passed along the rest of the "context" to the implementation (column_name, user_id, key_id, application_context). This DecryptTypedList is a helper method inside the class that assembles the call to the encrypt/decrypt with all the params.
| return true; | ||
| } | ||
|
|
||
| std::string DataBatchEncryptionSequencer::ValidateDecryptionVersion() { |
There was a problem hiding this comment.
nit/question: I remember seeing this code in another PR - let's make sure it's not duplicate.
There was a problem hiding this comment.
Yes, this was moved from ConvertAndDecrypt to here for readabilty.
| return ""; | ||
| } | ||
|
|
||
| std::string DataBatchEncryptionSequencer::SafeGetEncryptionMode() { |
There was a problem hiding this comment.
can we consider using an optional, rather than an empty string to signal 'error'?
argmarco-tkd
left a comment
There was a problem hiding this comment.
thanks for this. Overall LGTM. Left a few comments, but none which are red flags/blockers for demo/discussion
- Small updates
…gent to facilitate testing. - Removed VALID_ENCRYPTION_METADATA constant from dbpa_remote_testapp.cpp to use the real one returned from the encryption result.