1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-10 14:35:59 +01:00

Remove deprecated method from PGPainless.java

This commit is contained in:
Paul Schaub 2021-06-29 14:47:05 +02:00
parent 9637ef5d35
commit 733dcf0a7e
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -19,7 +19,6 @@ import java.util.Date;
import org.bouncycastle.openpgp.PGPKeyRing; import org.bouncycastle.openpgp.PGPKeyRing;
import org.bouncycastle.openpgp.PGPSecretKeyRing; import org.bouncycastle.openpgp.PGPSecretKeyRing;
import org.pgpainless.algorithm.EncryptionPurpose;
import org.pgpainless.decryption_verification.DecryptionBuilder; import org.pgpainless.decryption_verification.DecryptionBuilder;
import org.pgpainless.decryption_verification.DecryptionStream; import org.pgpainless.decryption_verification.DecryptionStream;
import org.pgpainless.encryption_signing.EncryptionBuilder; import org.pgpainless.encryption_signing.EncryptionBuilder;
@ -53,9 +52,6 @@ public class PGPainless {
/** /**
* Create an {@link EncryptionStream}, which can be used to encrypt and/or sign data using OpenPGP. * Create an {@link EncryptionStream}, which can be used to encrypt and/or sign data using OpenPGP.
* This method assumes that the stream will be used to encrypt data for communication purposes.
* If you instead want to encrypt data that will be saved on disk (eg. a backup), use
* {@link #encryptAndOrSign(EncryptionPurpose)} and chose an appropriate purpose.
* *
* @return builder * @return builder
*/ */
@ -63,18 +59,6 @@ public class PGPainless {
return new EncryptionBuilder(); return new EncryptionBuilder();
} }
/**
* Create an {@link EncryptionStream}, that can be used to encrypt and/or sign data using OpenPGP.
*
* @param purpose how will the data be used?
* @return builder
* @deprecated use {@link #encryptAndOrSign()} and set the purpose in
* {@link org.pgpainless.encryption_signing.EncryptionOptions} instead
*/
public static EncryptionBuilder encryptAndOrSign(EncryptionPurpose purpose) {
return new EncryptionBuilder(purpose);
}
/** /**
* Create a {@link DecryptionStream}, which can be used to decrypt and/or verify data using OpenPGP. * Create a {@link DecryptionStream}, which can be used to decrypt and/or verify data using OpenPGP.
* *