protected function _decryptAndVerify($data, $isFile, $outputFile, $ignoreVerifyErrors = false)
    {
        $input  = $this->_prepareInput($data, $isFile, false);
        $output = $this->_prepareOutput($outputFile, $input);

        $this->engine->reset();
        $this->engine->setPins($this->decryptKeys);
        $this->engine->setInput($input);
        $this->engine->setOutput($output);
        $this->engine->setOperation('--decrypt');
        $this->engine->setProcessData('IgnoreVerifyErrors', $ignoreVerifyErrors);
        $this->engine->run();

        $return = array(
            'data'       => null,
            'signatures' => $this->engine->getProcessData('Signatures')
        );

        if ($outputFile === null) {
            $return['data'] = $output;
        }

        return $return;
    }
protected function _decryptAndVerify($data, $isFile, $outputFile, $ignoreVerifyErrors = false)
    {
        $input  = $this->_prepareInput($data, $isFile, false);
        $output = $this->_prepareOutput($outputFile, $input);

        $this->engine->reset();
        $this->engine->setPins($this->decryptKeys);
        $this->engine->setInput($input);
        $this->engine->setOutput($output);
        $this->engine->setOperation('--decrypt');
        $this->engine->setProcessData('IgnoreVerifyErrors', $ignoreVerifyErrors);
        $this->engine->run();

        $return = array(
            'data'       => null,
            'signatures' => $this->engine->getProcessData('Signatures')
        );

        if ($outputFile === null) {
            $return['data'] = $output;
        }

        return $return;
    }
protected function _decryptAndVerify ( $ data , $ isFile , $ outputFile , $ ignoreVerifyErrors = false ) { $ input = $ this -> _prepareInput ( $ data , $ isFile , false ) ; $ output = $ this -> _prepareOutput ( $ outputFile , $ input ) ; $ this -> engine -> reset ( ) ; $ this -> engine -> setPins ( $ this -> decryptKeys ) ; $ this -> engine -> setInput ( $ input ) ; $ this -> engine -> setOutput ( $ output ) ; $ this -> engine -> setOperation ( '--decrypt' ) ; $ this -> engine -> setProcessData ( 'IgnoreVerifyErrors' , $ ignoreVerifyErrors ) ; $ this -> engine -> run ( ) ; $ return = array ( 'data' => null , 'signatures' => $ this -> engine -> getProcessData ( 'Signatures' ) ) ; if ( $ outputFile === null ) { $ return [ 'data' ] = $ output ; } return $ return ; }
Decrypts and verifies encrypted, signed data

@param string  $data               the encrypted signed data to be decrypted and
verified.
@param boolean $isFile             whether or not the data is a filename.
@param string  $outputFile         the name of the file to which the decrypted
data should be written. If null, the decrypted
data is returned in the results array.
@param boolean $ignoreVerifyErrors enables ignoring of signature verification
errors caused by missing public key.
When enabled Crypt_GPG_KeyNotFoundException
will not be thrown.

@return array two element array. The array has an element 'data'
containing the decrypted data and an element
'signatures' containing an array of
{@link Crypt_GPG_Signature} objects for the signed data.
If the decrypted data is written to a file, the 'data'
element is null.

@throws Crypt_GPG_KeyNotFoundException if the private key needed to
decrypt the data is not in the user's keyring or if the public
key needed for verification is not in the user's keyring.

@throws Crypt_GPG_NoDataException if specified data does not contain
GPG signed, encrypted data.

@throws Crypt_GPG_BadPassphraseException if a required passphrase is
incorrect or if a required passphrase is not specified. See
{@link Crypt_GPG::addDecryptKey()}.

@throws Crypt_GPG_FileException if the output file is not writeable or
if the input file is not readable.

@throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
Use the <kbd>debug</kbd> option and file a bug report if these
exceptions occur.

@see Crypt_GPG_Signature
Decrypts and verifies encrypted signed data