@@ -281,7 +281,13 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData(final Master
281
281
/**
282
282
* Calls {@link #encryptData(MasterKeyProvider, byte[], Map)} on the UTF-8 encoded bytes of
283
283
* {@code plaintext} and base64 encodes the result.
284
+ * @deprecated Use the {@link #encryptData(MasterKeyProvider, byte[], Map)} and
285
+ * {@link #decryptData(MasterKeyProvider, byte[])} APIs instead. {@code encryptString} and {@code decryptString}
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} and base64-encode the input to
288
+ * {@code decryptString}. These deprecated APIs will be removed in the future.
284
289
*/
290
+ @ Deprecated
285
291
public <K extends MasterKey <K >> CryptoResult <String , K > encryptString (
286
292
final MasterKeyProvider <K > provider ,
287
293
final String plaintext ,
@@ -295,7 +301,13 @@ public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(
295
301
/**
296
302
* Calls {@link #encryptData(CryptoMaterialsManager, byte[], Map)} on the UTF-8 encoded bytes of
297
303
* {@code plaintext} and base64 encodes the result.
304
+ * @deprecated Use the {@link #encryptData(CryptoMaterialsManager, byte[], Map)} and
305
+ * {@link #decryptData(CryptoMaterialsManager, byte[])} APIs instead. {@code encryptString} and {@code decryptString}
306
+ * work as expected if you use them together. However, to work with other language implementations of the AWS
307
+ * Encryption SDK, you need to base64-decode the output of {@code encryptString} and base64-encode the input to
308
+ * {@code decryptString}. These deprecated APIs will be removed in the future.
298
309
*/
310
+ @ Deprecated
299
311
public CryptoResult <String , ?> encryptString (
300
312
CryptoMaterialsManager materialsManager ,
301
313
final String plaintext ,
@@ -313,7 +325,13 @@ public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(
313
325
/**
314
326
* Returns the equivalent to calling {@link #encryptString(MasterKeyProvider, String, Map)} with
315
327
* an empty {@code encryptionContext}.
328
+ * @deprecated Use the {@link #encryptData(MasterKeyProvider, byte[])} and
329
+ * {@link #decryptData(MasterKeyProvider, byte[])} APIs instead. {@code encryptString} and {@code decryptString}
330
+ * work as expected if you use them together. However, to work with other language implementations of the AWS
331
+ * Encryption SDK, you need to base64-decode the output of {@code encryptString} and base64-encode the input to
332
+ * {@code decryptString}. These deprecated APIs will be removed in the future.
316
333
*/
334
+ @ Deprecated
317
335
public <K extends MasterKey <K >> CryptoResult <String , K > encryptString (final MasterKeyProvider <K > provider ,
318
336
final String plaintext ) {
319
337
return encryptString (provider , plaintext , EMPTY_MAP );
@@ -322,7 +340,13 @@ public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(final Mast
322
340
/**
323
341
* Returns the equivalent to calling {@link #encryptString(CryptoMaterialsManager, String, Map)} with
324
342
* an empty {@code encryptionContext}.
343
+ * @deprecated Use the {@link #encryptData(CryptoMaterialsManager, byte[])} and
344
+ * {@link #decryptData(CryptoMaterialsManager, byte[])} APIs instead. {@code encryptString} and {@code decryptString}
345
+ * work as expected if you use them together. However, to work with other language implementations of the AWS
346
+ * Encryption SDK, you need to base64-decode the output of {@code encryptString} and base64-encode the input to
347
+ * {@code decryptString}. These deprecated APIs will be removed in the future.
325
348
*/
349
+ @ Deprecated
326
350
public CryptoResult <String , ?> encryptString (
327
351
final CryptoMaterialsManager materialsManager ,
328
352
final String plaintext
@@ -345,9 +369,9 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData(final Master
345
369
* Decrypts the provided ciphertext by delegating to the provided materialsManager to obtain the decrypted
346
370
* {@link DataKey}.
347
371
*
348
- * @param materialsManager
349
- * @param ciphertext
350
- * @return
372
+ * @param materialsManager the {@link CryptoMaterialsManager} to use for decryption operations.
373
+ * @param ciphertext the ciphertext to attempt to decrypt.
374
+ * @return the {@link CryptoResult} with the decrypted data.
351
375
*/
352
376
public CryptoResult <byte [], ?> decryptData (
353
377
final CryptoMaterialsManager materialsManager ,
@@ -402,7 +426,13 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData(
402
426
* UTF-8 encoded string.
403
427
*
404
428
* @see #decryptData(MasterKeyProvider, byte[])
429
+ * @deprecated Use the {@link #decryptData(MasterKeyProvider, byte[])} and
430
+ * {@link #encryptData(MasterKeyProvider, byte[], Map)} APIs instead. {@code encryptString} and {@code decryptString}
431
+ * work as expected if you use them together. However, to work with other language implementations of the AWS
432
+ * Encryption SDK, you need to base64-decode the output of {@code encryptString} and base64-encode the input to
433
+ * {@code decryptString}. These deprecated APIs will be removed in the future.
405
434
*/
435
+ @ Deprecated
406
436
@ SuppressWarnings ("unchecked" )
407
437
public <K extends MasterKey <K >> CryptoResult <String , K > decryptString (
408
438
final MasterKeyProvider <K > provider ,
@@ -416,7 +446,13 @@ public <K extends MasterKey<K>> CryptoResult<String, K> decryptString(
416
446
* UTF-8 encoded string.
417
447
*
418
448
* @see #decryptData(CryptoMaterialsManager, byte[])
449
+ * @deprecated Use the {@link #decryptData(CryptoMaterialsManager, byte[])} and
450
+ * {@link #encryptData(CryptoMaterialsManager, byte[], Map)} APIs instead. {@code encryptString} and {@code decryptString}
451
+ * work as expected if you use them together. However, to work with other language implementations of the AWS
452
+ * Encryption SDK, you need to base64-decode the output of {@code encryptString} and base64-encode the input to
453
+ * {@code decryptString}. These deprecated APIs will be removed in the future.
419
454
*/
455
+ @ Deprecated
420
456
public CryptoResult <String , ?> decryptString (final CryptoMaterialsManager provider ,
421
457
final String ciphertext ) {
422
458
Utils .assertNonNull (provider , "provider" );
0 commit comments