Skip to content

Commit b60f8f1

Browse files
committed
Improve deprecation wording based on feedback.
1 parent 5e4b220 commit b60f8f1

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

src/main/java/com/amazonaws/encryptionsdk/AwsCrypto.java

+26-16
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,10 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData(final Master
283283
* {@code plaintext} and base64 encodes the result.
284284
* @deprecated Use the {@link #encryptData(MasterKeyProvider, byte[], Map)} and
285285
* {@link #decryptData(MasterKeyProvider, byte[])} APIs instead. {@code encryptString} and {@code decryptString}
286-
* require an extra Base64 decode/encode step to interoperate with other AWS Encryption SDK implementations. Data
287-
* encoding is an application-specific choice. These deprecated APIs will be removed in the future.
286+
* work as expected if you use them together. However, to work with other language implementations of the AWS
287+
* Encryption SDK, you need to base64 decode the output of {@code encryptString}.
288+
* {@code decryptString} will base64 decode plaintext before returning the result.
289+
* These deprecated APIs will be removed in the future.
288290
*/
289291
@Deprecated
290292
public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(
@@ -302,8 +304,10 @@ public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(
302304
* {@code plaintext} and base64 encodes the result.
303305
* @deprecated Use the {@link #encryptData(CryptoMaterialsManager, byte[], Map)} and
304306
* {@link #decryptData(CryptoMaterialsManager, byte[])} APIs instead. {@code encryptString} and {@code decryptString}
305-
* require an extra Base64 decode/encode step to interoperate with other AWS Encryption SDK implementations. Data
306-
* encoding is an application-specific choice. These deprecated APIs will be removed in the future.
307+
* work as expected if you use them together. However, to work with other language implementations of the AWS
308+
* Encryption SDK, you need to base64 decode the output of {@code encryptString}.
309+
* {@code decryptString} will base64 decode plaintext before returning the result.
310+
* These deprecated APIs will be removed in the future.
307311
*/
308312
@Deprecated
309313
public CryptoResult<String, ?> encryptString(
@@ -325,8 +329,10 @@ public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(
325329
* an empty {@code encryptionContext}.
326330
* @deprecated Use the {@link #encryptData(MasterKeyProvider, byte[])} and
327331
* {@link #decryptData(MasterKeyProvider, byte[])} APIs instead. {@code encryptString} and {@code decryptString}
328-
* require an extra Base64 decode/encode step to interoperate with other AWS Encryption SDK implementations. Data
329-
* encoding is an application-specific choice. These deprecated APIs will be removed in the future.
332+
* work as expected if you use them together. However, to work with other language implementations of the AWS
333+
* Encryption SDK, you need to base64 decode the output of {@code encryptString}.
334+
* {@code decryptString} will base64 decode plaintext before returning the result.
335+
* These deprecated APIs will be removed in the future.
330336
*/
331337
@Deprecated
332338
public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(final MasterKeyProvider<K> provider,
@@ -339,8 +345,10 @@ public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(final Mast
339345
* an empty {@code encryptionContext}.
340346
* @deprecated Use the {@link #encryptData(CryptoMaterialsManager, byte[])} and
341347
* {@link #decryptData(CryptoMaterialsManager, byte[])} APIs instead. {@code encryptString} and {@code decryptString}
342-
* require an extra Base64 decode/encode step to interoperate with other AWS Encryption SDK implementations. Data
343-
* encoding is an application-specific choice. These deprecated APIs will be removed in the future.
348+
* work as expected if you use them together. However, to work with other language implementations of the AWS
349+
* Encryption SDK, you need to base64 decode the output of {@code encryptString}.
350+
* {@code decryptString} will base64 decode plaintext before returning the result.
351+
* These deprecated APIs will be removed in the future.
344352
*/
345353
@Deprecated
346354
public CryptoResult<String, ?> encryptString(
@@ -423,10 +431,11 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData(
423431
*
424432
* @see #decryptData(MasterKeyProvider, byte[])
425433
* @deprecated Use the {@link #decryptData(MasterKeyProvider, byte[])} and
426-
* {@link #encryptData(MasterKeyProvider, byte[], Map)} APIs instead. {@code encryptString} and
427-
* {@code decryptString} require an extra Base64 decode/encode step to interoperate with other AWS Encryption SDK
428-
* implementations. Data encoding is an application-specific choice. These deprecated APIs will be removed in the
429-
* future.
434+
* {@link #encryptData(MasterKeyProvider, byte[], Map)} APIs instead. {@code encryptString} and {@code decryptString}
435+
* work as expected if you use them together. However, to work with other language implementations of the AWS
436+
* Encryption SDK, you need to base64 decode the output of {@code encryptString}.
437+
* {@code decryptString} will base64 decode plaintext before returning the result.
438+
* These deprecated APIs will be removed in the future.
430439
*/
431440
@Deprecated
432441
@SuppressWarnings("unchecked")
@@ -443,10 +452,11 @@ public <K extends MasterKey<K>> CryptoResult<String, K> decryptString(
443452
*
444453
* @see #decryptData(CryptoMaterialsManager, byte[])
445454
* @deprecated Use the {@link #decryptData(CryptoMaterialsManager, byte[])} and
446-
* {@link #encryptData(CryptoMaterialsManager, byte[], Map)} APIs instead. {@code encryptString} and
447-
* {@code decryptString} require an extra Base64 decode/encode step to interoperate with other AWS Encryption SDK
448-
* implementations. Data encoding is an application-specific choice. These deprecated APIs will be removed in the
449-
* future.
455+
* {@link #encryptData(CryptoMaterialsManager, byte[], Map)} APIs instead. {@code encryptString} and {@code decryptString}
456+
* work as expected if you use them together. However, to work with other language implementations of the AWS
457+
* Encryption SDK, you need to base64 decode the output of {@code encryptString}.
458+
* {@code decryptString} will base64 decode plaintext before returning the result.
459+
* These deprecated APIs will be removed in the future.
450460
*/
451461
@Deprecated
452462
public CryptoResult<String, ?> decryptString(final CryptoMaterialsManager provider,

0 commit comments

Comments
 (0)