1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-17 09:41:08 +01:00

replace create{Encryptor,Decryptor} methods with encryptAndOrSign,decryptAndOrVerify

This commit is contained in:
Paul Schaub 2020-11-29 15:33:54 +01:00
parent accb18bd4e
commit cc1e4601e3
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
6 changed files with 33 additions and 12 deletions

View file

@ -55,17 +55,38 @@ public class PGPainless {
/**
* Create an {@link EncryptionStream}, which can be used to encrypt and/or sign data using OpenPGP.
*
* @deprecated Use {@link #encryptAndOrSign()} instead.
* @return builder
*/
public static EncryptionBuilder createEncryptor() {
return encryptAndOrSign();
}
/**
* Create an {@link EncryptionStream}, which can be used to encrypt and/or sign data using OpenPGP.
* @return builder
*/
public static EncryptionBuilder encryptAndOrSign() {
return new EncryptionBuilder();
}
/**
* Create a {@link DecryptionStream}, which can be used to decrypt and/or verify data using OpenPGP.
*
* @deprecated Use {@link #decryptAndOrVerify()} instead.
* @return builder
*/
@Deprecated
public static DecryptionBuilder createDecryptor() {
return decryptAndOrVerify();
}
/**
* Create a {@link DecryptionStream}, which can be used to decrypt and/or verify data using OpenPGP.
* @return builder
*/
public static DecryptionBuilder createDecryptor() {
public static DecryptionBuilder decryptAndOrVerify() {
return new DecryptionBuilder();
}