Package org.pgpainless.sop
Class EncryptImpl
java.lang.Object
org.pgpainless.sop.EncryptImpl
- All Implemented Interfaces:
sop.operation.Encrypt
Implementation of the
encryptoperation using PGPainless.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsop.operation.Encrypt
mode
(sop.enums.EncryptAs mode) sop.operation.Encrypt
noArmor()
sop.Ready
plaintext
(InputStream plaintext) sop.operation.Encrypt
sop.operation.Encrypt
signWith
(InputStream keyIn) sop.operation.Encrypt
withCert
(InputStream cert) sop.operation.Encrypt
withKeyPassword
(byte[] password) sop.operation.Encrypt
withPassword
(String password) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface sop.operation.Encrypt
plaintext, profile, signWith, withCert, withKeyPassword
-
Field Details
-
SUPPORTED_PROFILES
-
-
Constructor Details
-
EncryptImpl
public EncryptImpl()
-
-
Method Details
-
noArmor
public sop.operation.Encrypt noArmor()- Specified by:
noArmor
in interfacesop.operation.Encrypt
-
mode
public sop.operation.Encrypt mode(sop.enums.EncryptAs mode) throws sop.exception.SOPGPException.UnsupportedOption - Specified by:
mode
in interfacesop.operation.Encrypt
- Throws:
sop.exception.SOPGPException.UnsupportedOption
-
signWith
public sop.operation.Encrypt signWith(InputStream keyIn) throws sop.exception.SOPGPException.KeyCannotSign, sop.exception.SOPGPException.UnsupportedAsymmetricAlgo, sop.exception.SOPGPException.BadData, IOException - Specified by:
signWith
in interfacesop.operation.Encrypt
- Throws:
sop.exception.SOPGPException.KeyCannotSign
sop.exception.SOPGPException.UnsupportedAsymmetricAlgo
sop.exception.SOPGPException.BadData
IOException
-
withKeyPassword
public sop.operation.Encrypt withKeyPassword(byte[] password) - Specified by:
withKeyPassword
in interfacesop.operation.Encrypt
-
withPassword
public sop.operation.Encrypt withPassword(String password) throws sop.exception.SOPGPException.PasswordNotHumanReadable, sop.exception.SOPGPException.UnsupportedOption - Specified by:
withPassword
in interfacesop.operation.Encrypt
- Throws:
sop.exception.SOPGPException.PasswordNotHumanReadable
sop.exception.SOPGPException.UnsupportedOption
-
withCert
public sop.operation.Encrypt withCert(InputStream cert) throws sop.exception.SOPGPException.CertCannotEncrypt, sop.exception.SOPGPException.UnsupportedAsymmetricAlgo, sop.exception.SOPGPException.BadData - Specified by:
withCert
in interfacesop.operation.Encrypt
- Throws:
sop.exception.SOPGPException.CertCannotEncrypt
sop.exception.SOPGPException.UnsupportedAsymmetricAlgo
sop.exception.SOPGPException.BadData
-
profile
- Specified by:
profile
in interfacesop.operation.Encrypt
-
plaintext
- Specified by:
plaintext
in interfacesop.operation.Encrypt
- Throws:
IOException
-