IMP_Mime_Viewer_Pgp
extends Horde_Mime_Viewer_Base
in package
Renderer to allow viewing/decrypting of PGP formatted messages (RFC 3156).
This class handles the following MIME types:
- application/pgp-encrypted (in multipart/encrypted part)
- application/pgp-keys
- application/pgp-signature (in multipart/signed part)
This driver may add the following parameters to the URL:
- pgp_verify_msg: (boolean) Do verification of PGP signed data?
- pgp_view_key: (boolean) View PGP key details?
Tags
Table of Contents
Constants
- PGP_SIGN_ENC = 'imp-pgp-signed-encrypted'
Properties
- $_capability : array<string|int, mixed>
- This driver's display capabilities.
- $_metadata : array<string|int, mixed>
- Metadata for the current viewer/data.
- $_sender : Horde_Mail_Rfc822_Address
- The address of the sender.
Methods
- canRender() : bool
- Can this driver render the data?
- _getEmbeddedMimeParts() : mixed
- If this MIME part can contain embedded MIME part(s), and those part(s) exist, return a representation of that data.
- _getSender() : Horde_Mail_Rfc822_Address
- Determine the address of the sender.
- _getSymmetricID() : string
- Generates the symmetric ID for this message.
- _outputPGPKey() : string
- Generates output for 'application/pgp-keys' MIME_Parts.
- _outputPGPSigned() : string
- Generates HTML output for 'multipart/signed' MIME parts.
- _render() : array<string|int, mixed>
- Return the full rendered version of the Horde_Mime_Part object.
- _renderInline() : array<string|int, mixed>
- Return the rendered inline version of the Horde_Mime_Part object.
- _renderRaw() : array<string|int, mixed>
- Return the full rendered version of the Horde_Mime_Part object.
Constants
PGP_SIGN_ENC
public
mixed
PGP_SIGN_ENC
= 'imp-pgp-signed-encrypted'
Properties
$_capability
This driver's display capabilities.
protected
array<string|int, mixed>
$_capability
= array(
'full' => \false,
'info' => \false,
'inline' => \true,
/* This driver *does* render raw data, but only for
* application/pgp-signature parts that have been processed by the
* text/plain driver and for displaying raw pgp keys. Altering this
* value is handled via the canRender() function. */
'raw' => \false,
)
$_metadata
Metadata for the current viewer/data.
protected
array<string|int, mixed>
$_metadata
= array('compressed' => \false, 'embedded' => \true, 'forceinline' => \true)
$_sender
The address of the sender.
protected
Horde_Mail_Rfc822_Address
$_sender
= \null
Methods
canRender()
Can this driver render the data?
public
canRender(string $mode) : bool
Parameters
- $mode : string
-
See parent::canRender().
Return values
bool —See parent::canRender().
_getEmbeddedMimeParts()
If this MIME part can contain embedded MIME part(s), and those part(s) exist, return a representation of that data.
protected
_getEmbeddedMimeParts() : mixed
Return values
mixed —A Horde_Mime_Part object representing the embedded data. Returns null if no embedded MIME part(s) exist.
_getSender()
Determine the address of the sender.
protected
_getSender() : Horde_Mail_Rfc822_Address
Return values
Horde_Mail_Rfc822_Address —The from address.
_getSymmetricID()
Generates the symmetric ID for this message.
protected
_getSymmetricID() : string
Return values
string —Symmetric ID.
_outputPGPKey()
Generates output for 'application/pgp-keys' MIME_Parts.
protected
_outputPGPKey() : string
Return values
string —The HTML output.
_outputPGPSigned()
Generates HTML output for 'multipart/signed' MIME parts.
protected
_outputPGPSigned() : string
Return values
string —The HTML output.
_render()
Return the full rendered version of the Horde_Mime_Part object.
protected
_render() : array<string|int, mixed>
Return values
array<string|int, mixed> —See parent::render().
_renderInline()
Return the rendered inline version of the Horde_Mime_Part object.
protected
_renderInline() : array<string|int, mixed>
Return values
array<string|int, mixed> —See parent::render().
_renderRaw()
Return the full rendered version of the Horde_Mime_Part object.
protected
_renderRaw() : array<string|int, mixed>
Return values
array<string|int, mixed> —See parent::render().