Constants

REVOKE_UNKNOWN

REVOKE_UNKNOWN

Revocation reasons.

REVOKE_SUPERSEDED

REVOKE_SUPERSEDED

REVOKE_COMPROMISED

REVOKE_COMPROMISED

REVOKE_RETIRED

REVOKE_RETIRED

REVOKE_NOTUSED

REVOKE_NOTUSED

Properties

$armorVersion

$armorVersion : string

Armor header identifying the current software version.

Type

string

$headers

$headers : array

Armor headers.

Type

array

$message

$message : \OpenPGP_Message

Message object.

Type

\OpenPGP_Message

$fingerprint

$fingerprint : string

Fingerprint of the base key.

Type

string

$id

$id : string

ID of the base key.

Type

string

$_armor

$_armor : string

Armor identifier.

Type

string

$_cache

$_cache : array

Cached data.

Type

array

Methods

create()

create(mixed  $data) : \Horde_Pgp_Element

Creates the element from the first found armor part of the class type in the armored input data.

Parameters

mixed $data

Armored PGP data.

Returns

\Horde_Pgp_Element

PGP element object.

__construct()

__construct(mixed  $data, array  $headers = array()) 

Constructor.

Parameters

mixed $data

Data of the part. Either raw PGP data or a OpenPGP_Message object.

array $headers

Header array.

__toString()

__toString() 

__get()

__get(  $name) 

Parameters

$name

getFingerprints()

getFingerprints() : array

Return the list of key fingerprints.

Returns

array —

Keys are key IDs; values are fingerprints.

getSignKeys()

getSignKeys() : array

Returns the list of signing subkeys within this key.

Returns

array —

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()

getUserIds() : array

Returns the list of user ID information associated with this key.

Returns

array —

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.

containsEmail()

containsEmail(  $email) : boolean

Does this key contain an e-mail address?

Parameters

$email

Returns

boolean —

True if the key contains the e-mail address.

getEncryptKeys()

getEncryptKeys() : array

Return the list of verified encryption subkeys in this key.

Returns

array —

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.

_parse()

_parse() 

Parse the message data, verifying the key contents.

_parseVerify()

_parseVerify(  $key,   $data,   $sig) 

Parameters

$key
$data
$sig

_parseCreation()

_parseCreation(  $p) 

Parameters

$p

_parseRevokePacket()

_parseRevokePacket(  $p) 

Parameters

$p