smaheshwar-pltr commented on code in PR #17984:
URL: https://github.com/apache/iceberg/pull/17984#discussion_r4025328104


##########
core/src/main/java/org/apache/iceberg/encryption/StandardEncryptionManager.java:
##########
@@ -184,20 +184,37 @@ ByteBuffer encryptedByKey(String manifestListKeyID) {
     return unwrappedKeyCache().get(encryptedKeyMetadata.encryptedById());
   }
 
+  /**
+   * Encrypts and registers manifest-list key metadata.
+   *
+   * @return the ID of the encrypted metadata
+   * @deprecated since 1.12.0, will be removed in 1.13.0; use {@link
+   *     #registerKeyMetadata(NativeEncryptionKeyMetadata)} instead.
+   */
+  @Deprecated
   public String addManifestListKeyMetadata(NativeEncryptionKeyMetadata 
keyMetadata) {
-    String manifestListKeyID = generateKeyId();
+    return registerKeyMetadata(keyMetadata).fileKey().keyId();
+  }
+
+  /**
+   * Encrypts and registers key metadata.
+   *
+   * @return the encrypted metadata and its wrapping key
+   */
+  public FileEncryptionKeys registerKeyMetadata(NativeEncryptionKeyMetadata 
keyMetadata) {

Review Comment:
   Pointing out 
https://github.com/apache/iceberg/pull/17984#discussion_r4025273789, I've tried 
to go for more generic naming here and checked that this API is compatible with 
https://github.com/apache/iceberg/pull/17545 to address that feedback



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