Crypt/GPG.php
public function encryptAndSign($data, $armor = self::ARMOR_ASCII)
    {
        return $this->_encryptAndSign($data, false, null, $armor);
    }
public function encryptAndSign($data, $armor = self::ARMOR_ASCII)
    {
        return $this->_encryptAndSign($data, false, null, $armor);
    }
Encrypts and signs data

Data is encrypted and signed in a single pass.

NOTE: Until GnuPG version 1.4.10, it was not possible to verify
encrypted-signed data without decrypting it at the same time. If you try
to use {@link Crypt_GPG::verify()} method on encrypted-signed data with
earlier GnuPG versions, you will get an error. Please use
{@link Crypt_GPG::decryptAndVerify()} to verify encrypted-signed data.

@param string  $data  the data to be encrypted and signed.
@param boolean $armor optional. If true, ASCII armored data is returned;
otherwise, binary data is returned. Defaults to
true.

@return string the encrypted signed data.

@throws Crypt_GPG_KeyNotFoundException if no encryption key is specified
or if no signing key is specified. See
{@link Crypt_GPG::addEncryptKey()} and
{@link Crypt_GPG::addSignKey()}.

@throws Crypt_GPG_BadPassphraseException if a specified passphrase is
incorrect or if a required passphrase is not specified.

@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::decryptAndVerify()