xanderbailey commented on code in PR #2834:
URL: https://github.com/apache/iceberg-rust/pull/2834#discussion_r3593583129


##########
crates/iceberg/src/encryption/key_metadata.rs:
##########
@@ -97,17 +102,7 @@ impl StandardKeyMetadata {
 
     /// Decodes from Java-compatible format.
     pub fn decode(bytes: &[u8]) -> Result<Self> {
-        let metadata = 
_serde::StandardKeyMetadataV1::decode(bytes).map(Self::from)?;
-        // Validate the DEK is a usable AES key (16/24/32 bytes) up front, so a
-        // malformed key surfaces a clear error.
-        SecureKey::new(metadata.encryption_key.as_bytes()).map_err(|e| {
-            Error::new(
-                ErrorKind::DataInvalid,
-                "Invalid encryption key in key metadata",
-            )
-            .with_source(e)
-        })?;

Review Comment:
   No special validation need in decode now. 



-- 
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