xanderbailey commented on PR #2383:
URL: https://github.com/apache/iceberg-rust/pull/2383#issuecomment-4406338575

   > `AesGcmFileDecryptor` actually didn't store any state? What actually 
matters is `AesGcmFileRead`, right? I'm not a big fan of adding too much 
abstraction. Why not just make things as following:
   ```
   pub struct EncryptedInputFile {
      key_metadata: StandardKeyMetadata,
      inner: InputFile
   }
   
   // Similar to EncryptedOutputFIle 
   ```
   
   Yeah okay so this is a good take. If we do this then it becomes very clear 
that `decrypt` gives us nothing:
   ```
       pub fn decrypt(&self, input: InputFile, key_metadata: &[u8]) -> 
Result<EncryptedInputFile> {
           let metadata = StandardKeyMetadata::decode(key_metadata)?;
           Ok(EncryptedInputFile::new(input, metadata))
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to