mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-09 10:19:47 +02:00
Implement sop encrypt --profile=XXX
This commit is contained in:
parent
f4ff5f89f7
commit
8a66f0bc4f
3 changed files with 38 additions and 0 deletions
|
@ -9,6 +9,7 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import sop.Profile;
|
||||
import sop.Ready;
|
||||
import sop.enums.EncryptAs;
|
||||
import sop.exception.SOPGPException;
|
||||
|
@ -146,6 +147,24 @@ public interface Encrypt {
|
|||
return withCert(new ByteArrayInputStream(cert));
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass in a profile.
|
||||
*
|
||||
* @param profile profile
|
||||
* @return builder instance
|
||||
*/
|
||||
default Encrypt profile(Profile profile) {
|
||||
return profile(profile.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass in a profile identifier.
|
||||
*
|
||||
* @param profileName profile identifier
|
||||
* @return builder instance
|
||||
*/
|
||||
Encrypt profile(String profileName);
|
||||
|
||||
/**
|
||||
* Encrypt the given data yielding the ciphertext.
|
||||
* @param plaintext plaintext
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue