@@ -294,7 +294,6 @@ public int getEncryptionFrameSize() { |
294 | 294 | * <p>This method is equivalent to calling {@link #estimateCiphertextSize(CryptoMaterialsManager, |
295 | 295 | * int, Map)} with a {@link DefaultCryptoMaterialsManager} based on the given provider. |
296 | 296 | */ |
297 | | - @Deprecated |
298 | 297 | public <K extends MasterKey<K>> long estimateCiphertextSize( |
299 | 298 | final MasterKeyProvider<K> provider, |
300 | 299 | final int plaintextSize, |
@@ -327,7 +326,6 @@ public <K extends MasterKey<K>> long estimateCiphertextSize( |
327 | 326 | * Returns the best estimate for the output length of encrypting a plaintext with the provided |
328 | 327 | * {@code plaintextSize} and {@code encryptionContext}. The actual ciphertext may be shorter. |
329 | 328 | */ |
330 | | - @Deprecated |
331 | 329 | public long estimateCiphertextSize( |
332 | 330 | CryptoMaterialsManager materialsManager, |
333 | 331 | final int plaintextSize, |
@@ -388,7 +386,6 @@ public long estimateCiphertextSize( |
388 | 386 | * Returns the equivalent to calling {@link #estimateCiphertextSize(MasterKeyProvider, int, Map)} |
389 | 387 | * with an empty {@code encryptionContext}. |
390 | 388 | */ |
391 | | - @Deprecated |
392 | 389 | public <K extends MasterKey<K>> long estimateCiphertextSize( |
393 | 390 | final MasterKeyProvider<K> provider, final int plaintextSize) { |
394 | 391 | return estimateCiphertextSize(provider, plaintextSize, EMPTY_MAP); |
@@ -407,7 +404,6 @@ public <K extends MasterKey<K>> long estimateCiphertextSize( |
407 | 404 | * Returns the equivalent to calling {@link #estimateCiphertextSize(CryptoMaterialsManager, int, |
408 | 405 | * Map)} with an empty {@code encryptionContext}. |
409 | 406 | */ |
410 | | - @Deprecated |
411 | 407 | public long estimateCiphertextSize( |
412 | 408 | final CryptoMaterialsManager materialsManager, final int plaintextSize) { |
413 | 409 | return estimateCiphertextSize(materialsManager, plaintextSize, EMPTY_MAP); |
@@ -488,7 +484,6 @@ public long estimateCiphertextSize( |
488 | 484 | * <p>This method is equivalent to calling {@link #encryptData(CryptoMaterialsManager, byte[], |
489 | 485 | * Map)} using a {@link DefaultCryptoMaterialsManager} based on the given provider. |
490 | 486 | */ |
491 | | - @Deprecated |
492 | 487 | public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData( |
493 | 488 | final MasterKeyProvider<K> provider, |
494 | 489 | final byte[] plaintext, |
@@ -503,7 +498,6 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData( |
503 | 498 | * Returns an encrypted form of {@code plaintext} that has been protected with {@link DataKey |
504 | 499 | * DataKeys} that are in turn protected by the given CryptoMaterialsProvider. |
505 | 500 | */ |
506 | | - @Deprecated |
507 | 501 | public CryptoResult<byte[], ?> encryptData( |
508 | 502 | CryptoMaterialsManager materialsManager, |
509 | 503 | final byte[] plaintext, |
@@ -548,7 +542,6 @@ private <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData( |
548 | 542 | * Returns the equivalent to calling {@link #encryptData(MasterKeyProvider, byte[], Map)} with an |
549 | 543 | * empty {@code encryptionContext}. |
550 | 544 | */ |
551 | | - @Deprecated |
552 | 545 | public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData( |
553 | 546 | final MasterKeyProvider<K> provider, final byte[] plaintext) { |
554 | 547 | return encryptData(provider, plaintext, EMPTY_MAP); |
@@ -558,7 +551,6 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData( |
558 | 551 | * Returns the equivalent to calling {@link #encryptData(CryptoMaterialsManager, byte[], Map)} |
559 | 552 | * with an empty {@code encryptionContext}. |
560 | 553 | */ |
561 | | - @Deprecated |
562 | 554 | public CryptoResult<byte[], ?> encryptData( |
563 | 555 | final CryptoMaterialsManager materialsManager, final byte[] plaintext) { |
564 | 556 | return encryptData(materialsManager, plaintext, EMPTY_MAP); |
@@ -650,7 +642,6 @@ public <K extends MasterKey<K>> CryptoResult<String, K> encryptString( |
650 | 642 | * usable {@link DataKey} in the ciphertext and then decrypts the ciphertext using that {@code |
651 | 643 | * DataKey}. |
652 | 644 | */ |
653 | | - @Deprecated |
654 | 645 | public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData( |
655 | 646 | final MasterKeyProvider<K> provider, final byte[] ciphertext) { |
656 | 647 | return decryptData(provider, new ParsedCiphertext(ciphertext, maxEncryptedDataKeys_)); |
@@ -664,15 +655,13 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData( |
664 | 655 | * @param ciphertext the ciphertext to attempt to decrypt. |
665 | 656 | * @return the {@link CryptoResult} with the decrypted data. |
666 | 657 | */ |
667 | | - @Deprecated |
668 | 658 | public CryptoResult<byte[], ?> decryptData( |
669 | 659 | final CryptoMaterialsManager materialsManager, final byte[] ciphertext) { |
670 | 660 | return decryptData(materialsManager, new ParsedCiphertext(ciphertext, maxEncryptedDataKeys_)); |
671 | 661 | } |
672 | 662 |
|
673 | 663 | /** @see #decryptData(MasterKeyProvider, byte[]) */ |
674 | 664 | @SuppressWarnings("unchecked") |
675 | | - @Deprecated |
676 | 665 | public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData( |
677 | 666 | final MasterKeyProvider<K> provider, final ParsedCiphertext ciphertext) { |
678 | 667 | Utils.assertNonNull(provider, "provider"); |
@@ -681,7 +670,6 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData( |
681 | 670 | } |
682 | 671 |
|
683 | 672 | /** @see #decryptData(CryptoMaterialsManager, byte[]) */ |
684 | | - @Deprecated |
685 | 673 | public CryptoResult<byte[], ?> decryptData( |
686 | 674 | final CryptoMaterialsManager materialsManager, final ParsedCiphertext ciphertext) { |
687 | 675 | Utils.assertNonNull(materialsManager, "materialsManager"); |
@@ -888,7 +876,6 @@ public <K extends MasterKey<K>> CryptoResult<String, K> decryptString( |
888 | 876 | * @see #encryptData(MasterKeyProvider, byte[], Map) |
889 | 877 | * @see javax.crypto.CipherOutputStream |
890 | 878 | */ |
891 | | - @Deprecated |
892 | 879 | public <K extends MasterKey<K>> CryptoOutputStream<K> createEncryptingStream( |
893 | 880 | final MasterKeyProvider<K> provider, |
894 | 881 | final OutputStream os, |
@@ -919,7 +906,6 @@ public <K extends MasterKey<K>> CryptoOutputStream<K> createEncryptingStream( |
919 | 906 | * @see #encryptData(MasterKeyProvider, byte[], Map) |
920 | 907 | * @see javax.crypto.CipherOutputStream |
921 | 908 | */ |
922 | | - @Deprecated |
923 | 909 | public CryptoOutputStream<?> createEncryptingStream( |
924 | 910 | final CryptoMaterialsManager materialsManager, |
925 | 911 | final OutputStream os, |
@@ -947,7 +933,6 @@ public CryptoOutputStream<?> createEncryptingStream( |
947 | 933 | * Returns the equivalent to calling {@link #createEncryptingStream(MasterKeyProvider, |
948 | 934 | * OutputStream, Map)} with an empty {@code encryptionContext}. |
949 | 935 | */ |
950 | | - @Deprecated |
951 | 936 | public <K extends MasterKey<K>> CryptoOutputStream<K> createEncryptingStream( |
952 | 937 | final MasterKeyProvider<K> provider, final OutputStream os) { |
953 | 938 | return createEncryptingStream(provider, os, EMPTY_MAP); |
@@ -966,7 +951,6 @@ public <K extends MasterKey<K>> CryptoOutputStream<K> createEncryptingStream( |
966 | 951 | * Returns the equivalent to calling {@link #createEncryptingStream(CryptoMaterialsManager, |
967 | 952 | * OutputStream, Map)} with an empty {@code encryptionContext}. |
968 | 953 | */ |
969 | | - @Deprecated |
970 | 954 | public CryptoOutputStream<?> createEncryptingStream( |
971 | 955 | final CryptoMaterialsManager materialsManager, final OutputStream os) { |
972 | 956 | return createEncryptingStream(materialsManager, os, EMPTY_MAP); |
@@ -989,7 +973,6 @@ public CryptoOutputStream<?> createEncryptingStream( |
989 | 973 | * @see #encryptData(MasterKeyProvider, byte[], Map) |
990 | 974 | * @see javax.crypto.CipherInputStream |
991 | 975 | */ |
992 | | - @Deprecated |
993 | 976 | public <K extends MasterKey<K>> CryptoInputStream<K> createEncryptingStream( |
994 | 977 | final MasterKeyProvider<K> provider, |
995 | 978 | final InputStream is, |
@@ -1020,7 +1003,6 @@ public <K extends MasterKey<K>> CryptoInputStream<K> createEncryptingStream( |
1020 | 1003 | * @see #encryptData(MasterKeyProvider, byte[], Map) |
1021 | 1004 | * @see javax.crypto.CipherInputStream |
1022 | 1005 | */ |
1023 | | - @Deprecated |
1024 | 1006 | public CryptoInputStream<?> createEncryptingStream( |
1025 | 1007 | CryptoMaterialsManager materialsManager, |
1026 | 1008 | final InputStream is, |
@@ -1052,7 +1034,6 @@ public CryptoInputStream<?> createEncryptingStream( |
1052 | 1034 | * Returns the equivalent to calling {@link #createEncryptingStream(MasterKeyProvider, |
1053 | 1035 | * InputStream, Map)} with an empty {@code encryptionContext}. |
1054 | 1036 | */ |
1055 | | - @Deprecated |
1056 | 1037 | public <K extends MasterKey<K>> CryptoInputStream<K> createEncryptingStream( |
1057 | 1038 | final MasterKeyProvider<K> provider, final InputStream is) { |
1058 | 1039 | return createEncryptingStream(provider, is, EMPTY_MAP); |
@@ -1071,7 +1052,6 @@ public <K extends MasterKey<K>> CryptoInputStream<K> createEncryptingStream( |
1071 | 1052 | * Returns the equivalent to calling {@link #createEncryptingStream(CryptoMaterialsManager, |
1072 | 1053 | * InputStream, Map)} with an empty {@code encryptionContext}. |
1073 | 1054 | */ |
1074 | | - @Deprecated |
1075 | 1055 | public CryptoInputStream<?> createEncryptingStream( |
1076 | 1056 | final CryptoMaterialsManager materialsManager, final InputStream is) { |
1077 | 1057 | return createEncryptingStream(materialsManager, is, EMPTY_MAP); |
@@ -1094,7 +1074,6 @@ public CryptoInputStream<?> createEncryptingStream( |
1094 | 1074 | * @see #decryptData(MasterKeyProvider, byte[]) |
1095 | 1075 | * @see javax.crypto.CipherOutputStream |
1096 | 1076 | */ |
1097 | | - @Deprecated |
1098 | 1077 | public <K extends MasterKey<K>> CryptoOutputStream<K> createUnsignedMessageDecryptingStream( |
1099 | 1078 | final MasterKeyProvider<K> provider, final OutputStream os) { |
1100 | 1079 | final MessageCryptoHandler cryptoHandler = |
@@ -1150,7 +1129,6 @@ public <K extends MasterKey<K>> CryptoOutputStream<K> createUnsignedMessageDecry |
1150 | 1129 | * @see #decryptData(MasterKeyProvider, byte[]) |
1151 | 1130 | * @see javax.crypto.CipherInputStream |
1152 | 1131 | */ |
1153 | | - @Deprecated |
1154 | 1132 | public <K extends MasterKey<K>> CryptoInputStream<K> createUnsignedMessageDecryptingStream( |
1155 | 1133 | final MasterKeyProvider<K> provider, final InputStream is) { |
1156 | 1134 | final MessageCryptoHandler cryptoHandler = |
@@ -1206,7 +1184,6 @@ public <K extends MasterKey<K>> CryptoInputStream<K> createUnsignedMessageDecryp |
1206 | 1184 | * @see #decryptData(CryptoMaterialsManager, byte[]) |
1207 | 1185 | * @see javax.crypto.CipherOutputStream |
1208 | 1186 | */ |
1209 | | - @Deprecated |
1210 | 1187 | public CryptoOutputStream<?> createUnsignedMessageDecryptingStream( |
1211 | 1188 | final CryptoMaterialsManager materialsManager, final OutputStream os) { |
1212 | 1189 | final MessageCryptoHandler cryptoHandler = |
@@ -1264,7 +1241,6 @@ public CryptoOutputStream<?> createUnsignedMessageDecryptingStream( |
1264 | 1241 | * @see #encryptData(CryptoMaterialsManager, byte[], Map) |
1265 | 1242 | * @see javax.crypto.CipherInputStream |
1266 | 1243 | */ |
1267 | | - @Deprecated |
1268 | 1244 | public CryptoInputStream<?> createUnsignedMessageDecryptingStream( |
1269 | 1245 | final CryptoMaterialsManager materialsManager, final InputStream is) { |
1270 | 1246 | final MessageCryptoHandler cryptoHandler = |
@@ -1330,7 +1306,6 @@ public CryptoInputStream<?> createUnsignedMessageDecryptingStream( |
1330 | 1306 | * @see #createUnsignedMessageDecryptingStream(MasterKeyProvider, OutputStream) |
1331 | 1307 | * @see javax.crypto.CipherOutputStream |
1332 | 1308 | */ |
1333 | | - @Deprecated |
1334 | 1309 | public <K extends MasterKey<K>> CryptoOutputStream<K> createDecryptingStream( |
1335 | 1310 | final MasterKeyProvider<K> provider, final OutputStream os) { |
1336 | 1311 | final MessageCryptoHandler cryptoHandler = |
@@ -1408,7 +1383,6 @@ public <K extends MasterKey<K>> CryptoOutputStream<K> createDecryptingStream( |
1408 | 1383 | * @see #createUnsignedMessageDecryptingStream(MasterKeyProvider, InputStream) |
1409 | 1384 | * @see javax.crypto.CipherInputStream |
1410 | 1385 | */ |
1411 | | - @Deprecated |
1412 | 1386 | public <K extends MasterKey<K>> CryptoInputStream<K> createDecryptingStream( |
1413 | 1387 | final MasterKeyProvider<K> provider, final InputStream is) { |
1414 | 1388 | final MessageCryptoHandler cryptoHandler = |
@@ -1486,7 +1460,6 @@ public <K extends MasterKey<K>> CryptoInputStream<K> createDecryptingStream( |
1486 | 1460 | * @see #createUnsignedMessageDecryptingStream(CryptoMaterialsManager, OutputStream) |
1487 | 1461 | * @see javax.crypto.CipherOutputStream |
1488 | 1462 | */ |
1489 | | - @Deprecated |
1490 | 1463 | public CryptoOutputStream<?> createDecryptingStream( |
1491 | 1464 | final CryptoMaterialsManager materialsManager, final OutputStream os) { |
1492 | 1465 | final MessageCryptoHandler cryptoHandler = |
@@ -1568,7 +1541,6 @@ public CryptoOutputStream<?> createDecryptingStream( |
1568 | 1541 | * @see #createUnsignedMessageDecryptingStream(CryptoMaterialsManager, InputStream) |
1569 | 1542 | * @see javax.crypto.CipherInputStream |
1570 | 1543 | */ |
1571 | | - @Deprecated |
1572 | 1544 | public CryptoInputStream<?> createDecryptingStream( |
1573 | 1545 | final CryptoMaterialsManager materialsManager, final InputStream is) { |
1574 | 1546 | final MessageCryptoHandler cryptoHandler = |
|