Horde_Pgp_Element_PublicKey
extends Horde_Pgp_Element_Key
in package
PGP element: public key.
Tags
Table of Contents
- REVOKE_COMPROMISED = 2
- REVOKE_NOTUSED = 4
- REVOKE_RETIRED = 3
- REVOKE_SUPERSEDED = 1
- REVOKE_UNKNOWN = 0
- Revocation reasons.
- $armorVersion : string
- Armor header identifying the current software version.
- $fingerprint : string
- $headers : array<string|int, mixed>
- Armor headers.
- $id : string
- $message : OpenPGP_Message
- Message object.
- $_armor : mixed
- $_cache : array<string|int, mixed>
- Cached data.
- __construct() : mixed
- Constructor.
- __get() : mixed
- __toString() : mixed
- containsEmail() : bool
- Does this key contain an e-mail address?
- create() : Horde_Pgp_Element
- Creates the element from the first found armor part of the class type in the armored input data.
- createMimePart() : Horde_Mime_Part
- Generates a Horde_Mime_Part object, in accordance with RFC 3156, that contains a public key.
- getEncryptKeys() : array<string|int, mixed>
- Return the list of verified encryption subkeys in this key.
- getFingerprints() : array<string|int, mixed>
- Return the list of key fingerprints.
- getPublicKey() : Horde_Pgp_Element_PublicKey
- Return the public key.
- getSignKeys() : array<string|int, mixed>
- Returns the list of signing subkeys within this key.
- getUserIds() : array<string|int, mixed>
- Returns the list of user ID information associated with this key.
- _parse() : mixed
- Parse the message data, verifying the key contents.
- _parseCreation() : mixed
- _parseRevokePacket() : mixed
- _parseVerify() : mixed
Constants
REVOKE_COMPROMISED
public
mixed
REVOKE_COMPROMISED
= 2
REVOKE_NOTUSED
public
mixed
REVOKE_NOTUSED
= 4
REVOKE_RETIRED
public
mixed
REVOKE_RETIRED
= 3
REVOKE_SUPERSEDED
public
mixed
REVOKE_SUPERSEDED
= 1
REVOKE_UNKNOWN
Revocation reasons.
public
mixed
REVOKE_UNKNOWN
= 0
Properties
$armorVersion
Armor header identifying the current software version.
public
string
$armorVersion
= 'Horde_Pgp Library (http://www.horde.org/)'
$fingerprint read-only
public
string
$fingerprint
Fingerprint of the base key.
$headers
Armor headers.
public
array<string|int, mixed>
$headers
$id read-only
public
string
$id
ID of the base key.
$message
Message object.
public
OpenPGP_Message
$message
$_armor
protected
mixed
$_armor
= 'PUBLIC KEY BLOCK'
$_cache
Cached data.
protected
array<string|int, mixed>
$_cache
Methods
__construct()
Constructor.
public
__construct(mixed $data[, array<string|int, mixed> $headers = array() ]) : mixed
Parameters
- $data : mixed
-
Data of the part. Either raw PGP data or a OpenPGP_Message object.
- $headers : array<string|int, mixed> = array()
-
Header array.
Return values
mixed —__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —containsEmail()
Does this key contain an e-mail address?
public
containsEmail(mixed $email) : bool
Parameters
- $email : mixed
Return values
bool —True if the key contains the e-mail address.
create()
Creates the element from the first found armor part of the class type in the armored input data.
public
static create(mixed $data) : Horde_Pgp_Element
Parameters
- $data : mixed
-
Armored PGP data.
Return values
Horde_Pgp_Element —PGP element object.
createMimePart()
Generates a Horde_Mime_Part object, in accordance with RFC 3156, that contains a public key.
public
createMimePart() : Horde_Mime_Part
Return values
Horde_Mime_Part —Object that contains the armored public key.
getEncryptKeys()
Return the list of verified encryption subkeys in this key.
public
getEncryptKeys() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of objects, with these keys:
- created: (DateTime) Creation time.
- fingerprint: (string) Key fingerprint.
- id: (string) Key ID.
- key: (OpenPGP_PublicKeyPacket) Key packet.
- revoke: (object) Revocation information. Elements:
- created: (DateTime) Creation time.
- info: (string) Human readable reason string.
- reason: (integer) Revocation reason.
getFingerprints()
Return the list of key fingerprints.
public
getFingerprints() : array<string|int, mixed>
Return values
array<string|int, mixed> —Keys are key IDs; values are fingerprints.
getPublicKey()
Return the public key.
public
getPublicKey() : Horde_Pgp_Element_PublicKey
Return values
Horde_Pgp_Element_PublicKey —Public key.
getSignKeys()
Returns the list of signing subkeys within this key.
public
getSignKeys() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of objects, with these keys:
- created: (DateTime) Creation time.
- fingerprint: (string) Key fingerprint.
- id: (string) Key ID.
- key: (OpenPGP_PublicKeyPacket) Key packet.
- revoke: (object) Revocation information. Elements:
- created: (DateTime) Creation time.
- info: (string) Human readable reason string.
- reason: (integer) Revocation reason.
getUserIds()
Returns the list of user ID information associated with this key.
public
getUserIds() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of objects, with these keys:
- comment: (string) Comment.
- created: (DateTime) Creation time.
- email: (Horde_Mail_Rfc822_Address) E-mail address.
- key: (OpenPGP_PublicKeyPacket) Key packet.
- revoke: (object) Revocation information. Elements:
- created: (DateTime) Creation time.
- info: (string) Human readable reason string.
- reason: (integer) Revocation reason.
- sig: (OpenPGP_SignaturePacket) Signature packet.
_parse()
Parse the message data, verifying the key contents.
protected
_parse() : mixed
Return values
mixed —_parseCreation()
protected
_parseCreation(mixed $p) : mixed
Parameters
- $p : mixed
Return values
mixed —_parseRevokePacket()
protected
_parseRevokePacket(mixed $p) : mixed
Parameters
- $p : mixed
Return values
mixed —_parseVerify()
protected
_parseVerify(mixed $key, mixed $data, mixed $sig) : mixed
Parameters
- $key : mixed
- $data : mixed
- $sig : mixed