Class DecryptExternal

  • All Implemented Interfaces:
    sop.operation.Decrypt

    public class DecryptExternal
    extends java.lang.Object
    implements sop.operation.Decrypt
    Implementation of the Decrypt operation using an external SOP binary.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      sop.ReadyWithResult<sop.DecryptionResult> ciphertext​(java.io.InputStream ciphertext)  
      sop.operation.Decrypt verifyNotAfter​(java.util.Date timestamp)  
      sop.operation.Decrypt verifyNotBefore​(java.util.Date timestamp)  
      sop.operation.Decrypt verifyWithCert​(java.io.InputStream cert)  
      sop.operation.Decrypt withKey​(java.io.InputStream key)  
      sop.operation.Decrypt withKeyPassword​(byte[] password)  
      sop.operation.Decrypt withPassword​(java.lang.String password)  
      sop.operation.Decrypt withSessionKey​(sop.SessionKey sessionKey)  
      • 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, withKeyPassword
    • Constructor Detail

      • DecryptExternal

        public DecryptExternal​(java.lang.String binary,
                               java.util.Properties environment,
                               ExternalSOP.TempDirProvider tempDirProvider)
    • Method Detail

      • verifyNotBefore

        public sop.operation.Decrypt verifyNotBefore​(java.util.Date timestamp)
                                              throws sop.exception.SOPGPException.UnsupportedOption
        Specified by:
        verifyNotBefore in interface sop.operation.Decrypt
        Throws:
        sop.exception.SOPGPException.UnsupportedOption
      • verifyNotAfter

        public sop.operation.Decrypt verifyNotAfter​(java.util.Date timestamp)
                                             throws sop.exception.SOPGPException.UnsupportedOption
        Specified by:
        verifyNotAfter in interface sop.operation.Decrypt
        Throws:
        sop.exception.SOPGPException.UnsupportedOption
      • verifyWithCert

        public sop.operation.Decrypt verifyWithCert​(java.io.InputStream cert)
                                             throws sop.exception.SOPGPException.BadData,
                                                    sop.exception.SOPGPException.UnsupportedAsymmetricAlgo,
                                                    java.io.IOException
        Specified by:
        verifyWithCert in interface sop.operation.Decrypt
        Throws:
        sop.exception.SOPGPException.BadData
        sop.exception.SOPGPException.UnsupportedAsymmetricAlgo
        java.io.IOException
      • withSessionKey

        public sop.operation.Decrypt withSessionKey​(sop.SessionKey sessionKey)
                                             throws sop.exception.SOPGPException.UnsupportedOption
        Specified by:
        withSessionKey in interface sop.operation.Decrypt
        Throws:
        sop.exception.SOPGPException.UnsupportedOption
      • withPassword

        public sop.operation.Decrypt withPassword​(java.lang.String password)
                                           throws sop.exception.SOPGPException.PasswordNotHumanReadable,
                                                  sop.exception.SOPGPException.UnsupportedOption
        Specified by:
        withPassword in interface sop.operation.Decrypt
        Throws:
        sop.exception.SOPGPException.PasswordNotHumanReadable
        sop.exception.SOPGPException.UnsupportedOption
      • withKey

        public sop.operation.Decrypt withKey​(java.io.InputStream key)
                                      throws sop.exception.SOPGPException.BadData,
                                             sop.exception.SOPGPException.UnsupportedAsymmetricAlgo,
                                             java.io.IOException
        Specified by:
        withKey in interface sop.operation.Decrypt
        Throws:
        sop.exception.SOPGPException.BadData
        sop.exception.SOPGPException.UnsupportedAsymmetricAlgo
        java.io.IOException
      • withKeyPassword

        public sop.operation.Decrypt withKeyPassword​(byte[] password)
                                              throws sop.exception.SOPGPException.UnsupportedOption,
                                                     sop.exception.SOPGPException.PasswordNotHumanReadable
        Specified by:
        withKeyPassword in interface sop.operation.Decrypt
        Throws:
        sop.exception.SOPGPException.UnsupportedOption
        sop.exception.SOPGPException.PasswordNotHumanReadable
      • ciphertext

        public sop.ReadyWithResult<sop.DecryptionResult> ciphertext​(java.io.InputStream ciphertext)
                                                             throws sop.exception.SOPGPException.BadData,
                                                                    sop.exception.SOPGPException.MissingArg,
                                                                    sop.exception.SOPGPException.CannotDecrypt,
                                                                    sop.exception.SOPGPException.KeyIsProtected,
                                                                    java.io.IOException
        Specified by:
        ciphertext in interface sop.operation.Decrypt
        Throws:
        sop.exception.SOPGPException.BadData
        sop.exception.SOPGPException.MissingArg
        sop.exception.SOPGPException.CannotDecrypt
        sop.exception.SOPGPException.KeyIsProtected
        java.io.IOException