roundcubemail/plugins/enigma/lib/enigma_engine.php
private function pgp_sign(&$msg_body, $key, $mode = null)
    {
        // @TODO: Handle big bodies using (temp) files
        $result = $this->pgp_driver->sign($msg_body, $key, $mode);

        if ($result instanceof enigma_error) {
            if ($result->getCode() != enigma_error::KEYNOTFOUND) {
                self::raise_error($result, __LINE__);
            }

            return $result;
        }

        $msg_body = $result;

        return true;
    }
private function pgp_sign(&$msg_body, $key, $mode = null)
    {
        // @TODO: Handle big bodies using (temp) files
        $result = $this->pgp_driver->sign($msg_body, $key, $mode);

        if ($result instanceof enigma_error) {
            if ($result->getCode() != enigma_error::KEYNOTFOUND) {
                self::raise_error($result, __LINE__);
            }

            return $result;
        }

        $msg_body = $result;

        return true;
    }
private function pgp_sign ( & $ msg_body , $ key , $ mode = null ) { // @TODO: Handle big bodies using (temp) files $ result = $ this -> pgp_driver -> sign ( $ msg_body , $ key , $ mode ) ; if ( $ result instanceof enigma_error ) { if ( $ result -> getCode ( ) != enigma_error :: KEYNOTFOUND ) { self :: raise_error ( $ result , __LINE__ ) ; } return $ result ; } $ msg_body = $ result ; return true ; }
PGP message signing

@param mixed      Message body
@param enigma_key The key (with passphrase)
@param int        Signing mode

@return mixed True or enigma_error
PGP message signing