Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions src/main/java/com/amazonaws/encryptionsdk/AwsCrypto.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ public int getEncryptionFrameSize() {
* <p>This method is equivalent to calling {@link #estimateCiphertextSize(CryptoMaterialsManager,
* int, Map)} with a {@link DefaultCryptoMaterialsManager} based on the given provider.
*/
@Deprecated
public <K extends MasterKey<K>> long estimateCiphertextSize(
final MasterKeyProvider<K> provider,
final int plaintextSize,
Expand Down Expand Up @@ -327,7 +326,6 @@ public <K extends MasterKey<K>> long estimateCiphertextSize(
* Returns the best estimate for the output length of encrypting a plaintext with the provided
* {@code plaintextSize} and {@code encryptionContext}. The actual ciphertext may be shorter.
*/
@Deprecated
public long estimateCiphertextSize(
CryptoMaterialsManager materialsManager,
final int plaintextSize,
Expand Down Expand Up @@ -388,7 +386,6 @@ public long estimateCiphertextSize(
* Returns the equivalent to calling {@link #estimateCiphertextSize(MasterKeyProvider, int, Map)}
* with an empty {@code encryptionContext}.
*/
@Deprecated
public <K extends MasterKey<K>> long estimateCiphertextSize(
final MasterKeyProvider<K> provider, final int plaintextSize) {
return estimateCiphertextSize(provider, plaintextSize, EMPTY_MAP);
Expand All @@ -407,7 +404,6 @@ public <K extends MasterKey<K>> long estimateCiphertextSize(
* Returns the equivalent to calling {@link #estimateCiphertextSize(CryptoMaterialsManager, int,
* Map)} with an empty {@code encryptionContext}.
*/
@Deprecated
public long estimateCiphertextSize(
final CryptoMaterialsManager materialsManager, final int plaintextSize) {
return estimateCiphertextSize(materialsManager, plaintextSize, EMPTY_MAP);
Expand Down Expand Up @@ -488,7 +484,6 @@ public long estimateCiphertextSize(
* <p>This method is equivalent to calling {@link #encryptData(CryptoMaterialsManager, byte[],
* Map)} using a {@link DefaultCryptoMaterialsManager} based on the given provider.
*/
@Deprecated
public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData(
final MasterKeyProvider<K> provider,
final byte[] plaintext,
Expand All @@ -503,7 +498,6 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData(
* Returns an encrypted form of {@code plaintext} that has been protected with {@link DataKey
* DataKeys} that are in turn protected by the given CryptoMaterialsProvider.
*/
@Deprecated
public CryptoResult<byte[], ?> encryptData(
CryptoMaterialsManager materialsManager,
final byte[] plaintext,
Expand Down Expand Up @@ -548,7 +542,6 @@ private <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData(
* Returns the equivalent to calling {@link #encryptData(MasterKeyProvider, byte[], Map)} with an
* empty {@code encryptionContext}.
*/
@Deprecated
public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData(
final MasterKeyProvider<K> provider, final byte[] plaintext) {
return encryptData(provider, plaintext, EMPTY_MAP);
Expand All @@ -558,7 +551,6 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> encryptData(
* Returns the equivalent to calling {@link #encryptData(CryptoMaterialsManager, byte[], Map)}
* with an empty {@code encryptionContext}.
*/
@Deprecated
public CryptoResult<byte[], ?> encryptData(
final CryptoMaterialsManager materialsManager, final byte[] plaintext) {
return encryptData(materialsManager, plaintext, EMPTY_MAP);
Expand Down Expand Up @@ -650,7 +642,6 @@ public <K extends MasterKey<K>> CryptoResult<String, K> encryptString(
* usable {@link DataKey} in the ciphertext and then decrypts the ciphertext using that {@code
* DataKey}.
*/
@Deprecated
public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData(
final MasterKeyProvider<K> provider, final byte[] ciphertext) {
return decryptData(provider, new ParsedCiphertext(ciphertext, maxEncryptedDataKeys_));
Expand All @@ -664,15 +655,13 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData(
* @param ciphertext the ciphertext to attempt to decrypt.
* @return the {@link CryptoResult} with the decrypted data.
*/
@Deprecated
public CryptoResult<byte[], ?> decryptData(
final CryptoMaterialsManager materialsManager, final byte[] ciphertext) {
return decryptData(materialsManager, new ParsedCiphertext(ciphertext, maxEncryptedDataKeys_));
}

/** @see #decryptData(MasterKeyProvider, byte[]) */
@SuppressWarnings("unchecked")
@Deprecated
public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData(
final MasterKeyProvider<K> provider, final ParsedCiphertext ciphertext) {
Utils.assertNonNull(provider, "provider");
Expand All @@ -681,7 +670,6 @@ public <K extends MasterKey<K>> CryptoResult<byte[], K> decryptData(
}

/** @see #decryptData(CryptoMaterialsManager, byte[]) */
@Deprecated
public CryptoResult<byte[], ?> decryptData(
final CryptoMaterialsManager materialsManager, final ParsedCiphertext ciphertext) {
Utils.assertNonNull(materialsManager, "materialsManager");
Expand Down Expand Up @@ -888,7 +876,6 @@ public <K extends MasterKey<K>> CryptoResult<String, K> decryptString(
* @see #encryptData(MasterKeyProvider, byte[], Map)
* @see javax.crypto.CipherOutputStream
*/
@Deprecated
public <K extends MasterKey<K>> CryptoOutputStream<K> createEncryptingStream(
final MasterKeyProvider<K> provider,
final OutputStream os,
Expand Down Expand Up @@ -919,7 +906,6 @@ public <K extends MasterKey<K>> CryptoOutputStream<K> createEncryptingStream(
* @see #encryptData(MasterKeyProvider, byte[], Map)
* @see javax.crypto.CipherOutputStream
*/
@Deprecated
public CryptoOutputStream<?> createEncryptingStream(
final CryptoMaterialsManager materialsManager,
final OutputStream os,
Expand Down Expand Up @@ -947,7 +933,6 @@ public CryptoOutputStream<?> createEncryptingStream(
* Returns the equivalent to calling {@link #createEncryptingStream(MasterKeyProvider,
* OutputStream, Map)} with an empty {@code encryptionContext}.
*/
@Deprecated
public <K extends MasterKey<K>> CryptoOutputStream<K> createEncryptingStream(
final MasterKeyProvider<K> provider, final OutputStream os) {
return createEncryptingStream(provider, os, EMPTY_MAP);
Expand All @@ -966,7 +951,6 @@ public <K extends MasterKey<K>> CryptoOutputStream<K> createEncryptingStream(
* Returns the equivalent to calling {@link #createEncryptingStream(CryptoMaterialsManager,
* OutputStream, Map)} with an empty {@code encryptionContext}.
*/
@Deprecated
public CryptoOutputStream<?> createEncryptingStream(
final CryptoMaterialsManager materialsManager, final OutputStream os) {
return createEncryptingStream(materialsManager, os, EMPTY_MAP);
Expand All @@ -989,7 +973,6 @@ public CryptoOutputStream<?> createEncryptingStream(
* @see #encryptData(MasterKeyProvider, byte[], Map)
* @see javax.crypto.CipherInputStream
*/
@Deprecated
public <K extends MasterKey<K>> CryptoInputStream<K> createEncryptingStream(
final MasterKeyProvider<K> provider,
final InputStream is,
Expand Down Expand Up @@ -1020,7 +1003,6 @@ public <K extends MasterKey<K>> CryptoInputStream<K> createEncryptingStream(
* @see #encryptData(MasterKeyProvider, byte[], Map)
* @see javax.crypto.CipherInputStream
*/
@Deprecated
public CryptoInputStream<?> createEncryptingStream(
CryptoMaterialsManager materialsManager,
final InputStream is,
Expand Down Expand Up @@ -1052,7 +1034,6 @@ public CryptoInputStream<?> createEncryptingStream(
* Returns the equivalent to calling {@link #createEncryptingStream(MasterKeyProvider,
* InputStream, Map)} with an empty {@code encryptionContext}.
*/
@Deprecated
public <K extends MasterKey<K>> CryptoInputStream<K> createEncryptingStream(
final MasterKeyProvider<K> provider, final InputStream is) {
return createEncryptingStream(provider, is, EMPTY_MAP);
Expand All @@ -1071,7 +1052,6 @@ public <K extends MasterKey<K>> CryptoInputStream<K> createEncryptingStream(
* Returns the equivalent to calling {@link #createEncryptingStream(CryptoMaterialsManager,
* InputStream, Map)} with an empty {@code encryptionContext}.
*/
@Deprecated
public CryptoInputStream<?> createEncryptingStream(
final CryptoMaterialsManager materialsManager, final InputStream is) {
return createEncryptingStream(materialsManager, is, EMPTY_MAP);
Expand All @@ -1094,7 +1074,6 @@ public CryptoInputStream<?> createEncryptingStream(
* @see #decryptData(MasterKeyProvider, byte[])
* @see javax.crypto.CipherOutputStream
*/
@Deprecated
public <K extends MasterKey<K>> CryptoOutputStream<K> createUnsignedMessageDecryptingStream(
final MasterKeyProvider<K> provider, final OutputStream os) {
final MessageCryptoHandler cryptoHandler =
Expand Down Expand Up @@ -1150,7 +1129,6 @@ public <K extends MasterKey<K>> CryptoOutputStream<K> createUnsignedMessageDecry
* @see #decryptData(MasterKeyProvider, byte[])
* @see javax.crypto.CipherInputStream
*/
@Deprecated
public <K extends MasterKey<K>> CryptoInputStream<K> createUnsignedMessageDecryptingStream(
final MasterKeyProvider<K> provider, final InputStream is) {
final MessageCryptoHandler cryptoHandler =
Expand Down Expand Up @@ -1206,7 +1184,6 @@ public <K extends MasterKey<K>> CryptoInputStream<K> createUnsignedMessageDecryp
* @see #decryptData(CryptoMaterialsManager, byte[])
* @see javax.crypto.CipherOutputStream
*/
@Deprecated
public CryptoOutputStream<?> createUnsignedMessageDecryptingStream(
final CryptoMaterialsManager materialsManager, final OutputStream os) {
final MessageCryptoHandler cryptoHandler =
Expand Down Expand Up @@ -1264,7 +1241,6 @@ public CryptoOutputStream<?> createUnsignedMessageDecryptingStream(
* @see #encryptData(CryptoMaterialsManager, byte[], Map)
* @see javax.crypto.CipherInputStream
*/
@Deprecated
public CryptoInputStream<?> createUnsignedMessageDecryptingStream(
final CryptoMaterialsManager materialsManager, final InputStream is) {
final MessageCryptoHandler cryptoHandler =
Expand Down Expand Up @@ -1330,7 +1306,6 @@ public CryptoInputStream<?> createUnsignedMessageDecryptingStream(
* @see #createUnsignedMessageDecryptingStream(MasterKeyProvider, OutputStream)
* @see javax.crypto.CipherOutputStream
*/
@Deprecated
public <K extends MasterKey<K>> CryptoOutputStream<K> createDecryptingStream(
final MasterKeyProvider<K> provider, final OutputStream os) {
final MessageCryptoHandler cryptoHandler =
Expand Down Expand Up @@ -1408,7 +1383,6 @@ public <K extends MasterKey<K>> CryptoOutputStream<K> createDecryptingStream(
* @see #createUnsignedMessageDecryptingStream(MasterKeyProvider, InputStream)
* @see javax.crypto.CipherInputStream
*/
@Deprecated
public <K extends MasterKey<K>> CryptoInputStream<K> createDecryptingStream(
final MasterKeyProvider<K> provider, final InputStream is) {
final MessageCryptoHandler cryptoHandler =
Expand Down Expand Up @@ -1486,7 +1460,6 @@ public <K extends MasterKey<K>> CryptoInputStream<K> createDecryptingStream(
* @see #createUnsignedMessageDecryptingStream(CryptoMaterialsManager, OutputStream)
* @see javax.crypto.CipherOutputStream
*/
@Deprecated
public CryptoOutputStream<?> createDecryptingStream(
final CryptoMaterialsManager materialsManager, final OutputStream os) {
final MessageCryptoHandler cryptoHandler =
Expand Down Expand Up @@ -1568,7 +1541,6 @@ public CryptoOutputStream<?> createDecryptingStream(
* @see #createUnsignedMessageDecryptingStream(CryptoMaterialsManager, InputStream)
* @see javax.crypto.CipherInputStream
*/
@Deprecated
public CryptoInputStream<?> createDecryptingStream(
final CryptoMaterialsManager materialsManager, final InputStream is) {
final MessageCryptoHandler cryptoHandler =
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/com/amazonaws/encryptionsdk/CryptoResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public class CryptoResult<T, K extends MasterKey<K>> {
/**
* The actual result of the cryptographic operation. This is not a defensive copy and callers
* should not modify it.
*
* @return
*/
public T getResult() {
return result_;
Expand All @@ -60,16 +58,12 @@ public T getResult() {
* Returns all relevant {@link MasterKey}s. In the case of encryption, returns all {@code
* MasterKey}s used to protect the ciphertext. In the case of decryption, returns just the {@code
* MasterKey} used to decrypt the ciphertext.
*
* @return
*/
@Deprecated
public List<K> getMasterKeys() {
return masterKeys_;
}

/** Convenience method for retrieving the keyIds in the results from {@link #getMasterKeys()}. */
@Deprecated
public List<String> getMasterKeyIds() {
final List<String> result = new ArrayList<>(masterKeys_.size());
for (final MasterKey<K> mk : masterKeys_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public PrivateKey getTrailingSignatureKey() {
}

/** Contains a list of all MasterKeys that could decrypt this message. */
@Deprecated
public List<MasterKey> getMasterKeys() {
return masterKeys;
}
Expand Down Expand Up @@ -181,7 +180,6 @@ public Builder setTrailingSignatureKey(PrivateKey trailingSignatureKey) {
return this;
}

@Deprecated
public List<MasterKey> getMasterKeys() {
return masterKeys;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public List<String> getRequiredEncryptionContextKeys() {
}
}

@Deprecated
public List<MasterKey> getMasterKeys() {
if (materials != null) {
return materials.getMasterKeys();
Expand Down