From 2483cedd991e31fb2306457fd7006c07450e1e4e Mon Sep 17 00:00:00 2001 From: Alex Chew Date: Wed, 11 May 2022 15:54:45 -0700 Subject: [PATCH 1/2] doc: clarify JceMasterKey supported algorithms --- .../amazonaws/encryptionsdk/jce/JceMasterKey.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java b/src/main/java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java index 3d40d0b07..198b3ca55 100644 --- a/src/main/java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java +++ b/src/main/java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java @@ -44,8 +44,9 @@ public class JceMasterKey extends MasterKey { private final JceKeyCipher jceKeyCipher_; /** - * Returns a {@code JceMasterKey} backed by {@code key} using {@code wrappingAlgorithm}. Currently - * "{@code AES/GCM/NoPadding}" is the only supported value for {@code wrappingAlgorithm}. + * Returns a {@code JceMasterKey} backed by the symmetric key {@code key} using + * {@code wrappingAlgorithm}. Currently "{@code AES/GCM/NoPadding}" is the only supported + * value for symmetric {@code wrappingAlgorithm}s. * * @param key key used to wrap/unwrap (encrypt/decrypt) {@link DataKey}s * @param provider @@ -67,10 +68,10 @@ public static JceMasterKey getInstance( } /** - * Returns a {@code JceMasterKey} backed by {@code unwrappingKey} and {@code wrappingKey} using - * {@code wrappingAlgorithm}. Currently only RSA algorithms are supported for {@code - * wrappingAlgorithm}. {@code wrappingAlgorithm}. If {@code unwrappingKey} is {@code null} then - * the returned {@link JceMasterKey} can only be used for encryption. + * Returns a {@code JceMasterKey} backed by the asymmetric key pair {@code unwrappingKey} and + * {@code wrappingKey} using {@code wrappingAlgorithm}. Currently only RSA algorithms are + * supported for asymmetric {@code wrappingAlgorithm}s. If {@code unwrappingKey} is {@code null} + * then the returned {@link JceMasterKey} can only be used for encryption. * * @param wrappingKey key used to wrap (encrypt) {@link DataKey}s * @param unwrappingKey (Optional) key used to unwrap (decrypt) {@link DataKey}s. From 4957d428455b2c29445acb6998aa1ed96943b8f9 Mon Sep 17 00:00:00 2001 From: Alex Chew Date: Wed, 11 May 2022 17:07:39 -0700 Subject: [PATCH 2/2] format --- .../java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java b/src/main/java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java index 198b3ca55..fc2fe8149 100644 --- a/src/main/java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java +++ b/src/main/java/com/amazonaws/encryptionsdk/jce/JceMasterKey.java @@ -44,9 +44,9 @@ public class JceMasterKey extends MasterKey { private final JceKeyCipher jceKeyCipher_; /** - * Returns a {@code JceMasterKey} backed by the symmetric key {@code key} using - * {@code wrappingAlgorithm}. Currently "{@code AES/GCM/NoPadding}" is the only supported - * value for symmetric {@code wrappingAlgorithm}s. + * Returns a {@code JceMasterKey} backed by the symmetric key {@code key} using {@code + * wrappingAlgorithm}. Currently "{@code AES/GCM/NoPadding}" is the only supported value for + * symmetric {@code wrappingAlgorithm}s. * * @param key key used to wrap/unwrap (encrypt/decrypt) {@link DataKey}s * @param provider