roundcubemail/plugins/enigma/lib/enigma_engine.php
private function pgp_encrypt(&$msg_body, $keys, $sign_key = null, $sign_pass = null)
    {
        // @TODO: Handle big bodies using (temp) files
        $result = $this->pgp_driver->encrypt($msg_body, $keys, $sign_key, $sign_pass);

        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_encrypt(&$msg_body, $keys, $sign_key = null, $sign_pass = null)
    {
        // @TODO: Handle big bodies using (temp) files
        $result = $this->pgp_driver->encrypt($msg_body, $keys, $sign_key, $sign_pass);

        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_encrypt ( & $ msg_body , $ keys , $ sign_key = null , $ sign_pass = null ) { // @TODO: Handle big bodies using (temp) files $ result = $ this -> pgp_driver -> encrypt ( $ msg_body , $ keys , $ sign_key , $ sign_pass ) ; 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 encrypting

@param mixed  Message body
@param array  Keys (array of enigma_key objects)
@param string Optional signing Key ID
@param string Optional signing Key password

@return mixed True or enigma_error
PGP message encrypting