Package org.pgpainless.sop
Class DecryptImpl
- java.lang.Object
 - 
- org.pgpainless.sop.DecryptImpl
 
 
- 
- All Implemented Interfaces:
 Decrypt
public class DecryptImpl extends Object implements Decrypt
 
- 
- 
Constructor Summary
Constructors Constructor Description DecryptImpl() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadyWithResult<DecryptionResult>ciphertext(InputStream ciphertext)Decrypts the given ciphertext, returning verification results and plaintext.DecryptImplverifyNotAfter(Date timestamp)Makes the SOP consider signatures after this date invalid.DecryptImplverifyNotBefore(Date timestamp)Makes the SOP consider signatures before this date invalid.DecryptImplverifyWithCert(InputStream certIn)Adds the verification cert.DecryptImplwithKey(InputStream keyIn)Adds the decryption key.DecryptImplwithPassword(String password)Tries to decrypt with the given password.DecryptImplwithSessionKey(SessionKey sessionKey)Tries to decrypt with the given session key.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface sop.operation.Decrypt
ciphertext, verifyWithCert, withKey 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
DecryptImpl
public DecryptImpl()
 
 - 
 
- 
Method Detail
- 
verifyNotBefore
public DecryptImpl verifyNotBefore(Date timestamp) throws SOPGPException.UnsupportedOption
Description copied from interface:DecryptMakes the SOP consider signatures before this date invalid.- Specified by:
 verifyNotBeforein interfaceDecrypt- Parameters:
 timestamp- timestamp- Returns:
 - builder instance
 - Throws:
 SOPGPException.UnsupportedOption
 
- 
verifyNotAfter
public DecryptImpl verifyNotAfter(Date timestamp) throws SOPGPException.UnsupportedOption
Description copied from interface:DecryptMakes the SOP consider signatures after this date invalid.- Specified by:
 verifyNotAfterin interfaceDecrypt- Parameters:
 timestamp- timestamp- Returns:
 - builder instance
 - Throws:
 SOPGPException.UnsupportedOption
 
- 
verifyWithCert
public DecryptImpl verifyWithCert(InputStream certIn) throws SOPGPException.BadData, IOException
Description copied from interface:DecryptAdds the verification cert.- Specified by:
 verifyWithCertin interfaceDecrypt- Parameters:
 certIn- input stream containing the cert- Returns:
 - builder instance
 - Throws:
 SOPGPException.BadDataIOException
 
- 
withSessionKey
public DecryptImpl withSessionKey(SessionKey sessionKey) throws SOPGPException.UnsupportedOption
Description copied from interface:DecryptTries to decrypt with the given session key.- Specified by:
 withSessionKeyin interfaceDecrypt- Parameters:
 sessionKey- session key- Returns:
 - builder instance
 - Throws:
 SOPGPException.UnsupportedOption
 
- 
withPassword
public DecryptImpl withPassword(String password)
Description copied from interface:DecryptTries to decrypt with the given password.- Specified by:
 withPasswordin interfaceDecrypt- Parameters:
 password- password- Returns:
 - builder instance
 
 
- 
withKey
public DecryptImpl withKey(InputStream keyIn) throws SOPGPException.KeyIsProtected, SOPGPException.BadData, SOPGPException.UnsupportedAsymmetricAlgo
Description copied from interface:DecryptAdds the decryption key.- Specified by:
 withKeyin interfaceDecrypt- Parameters:
 keyIn- input stream containing the key- Returns:
 - builder instance
 - Throws:
 SOPGPException.KeyIsProtectedSOPGPException.BadDataSOPGPException.UnsupportedAsymmetricAlgo
 
- 
ciphertext
public ReadyWithResult<DecryptionResult> ciphertext(InputStream ciphertext) throws SOPGPException.BadData, SOPGPException.MissingArg
Description copied from interface:DecryptDecrypts the given ciphertext, returning verification results and plaintext.- Specified by:
 ciphertextin interfaceDecrypt- Parameters:
 ciphertext- ciphertext- Returns:
 - ready with result
 - Throws:
 SOPGPException.BadDataSOPGPException.MissingArg
 
 - 
 
 -