rdblue commented on code in PR #7770:
URL: https://github.com/apache/iceberg/pull/7770#discussion_r1676486225


##########
core/src/main/java/org/apache/iceberg/encryption/EncryptionUtil.java:
##########
@@ -71,30 +70,35 @@ public static KeyManagementClient 
createKmsClient(Map<String, String> catalogPro
   }
 
   public static EncryptionManager createEncryptionManager(
-      Map<String, String> tableProperties, KeyManagementClient kmsClient) {
+      String tableKeyId, int dekLength, KeyManagementClient kmsClient) {
     Preconditions.checkArgument(kmsClient != null, "Invalid KMS client: null");
-    String tableKeyId = 
tableProperties.get(TableProperties.ENCRYPTION_TABLE_KEY);
 
     if (null == tableKeyId) {
       // Unencrypted table
       return PlaintextEncryptionManager.instance();
     }
 
-    int dataKeyLength =
-        PropertyUtil.propertyAsInt(
-            tableProperties,
-            TableProperties.ENCRYPTION_DEK_LENGTH,
-            TableProperties.ENCRYPTION_DEK_LENGTH_DEFAULT);
-
     Preconditions.checkState(
-        dataKeyLength == 16 || dataKeyLength == 24 || dataKeyLength == 32,
+        dekLength == 16 || dekLength == 24 || dekLength == 32,

Review Comment:
   I don't think it is necessary to rename `dataKeyLength` to `dekLength`. I 
also think the former name is easier to understand.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to