OpenPGP PHP
 All Classes Namespaces Functions Variables
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
OpenPGP_Packet Class Reference

OpenPGP packet. More...

Inheritance diagram for OpenPGP_Packet:
OpenPGP_AsymmetricSessionKeyPacket OpenPGP_CompressedDataPacket OpenPGP_EncryptedDataPacket OpenPGP_ExperimentalPacket OpenPGP_LiteralDataPacket OpenPGP_MarkerPacket OpenPGP_ModificationDetectionCodePacket OpenPGP_OnePassSignaturePacket OpenPGP_PublicKeyPacket OpenPGP_SignaturePacket OpenPGP_SignaturePacket_Subpacket OpenPGP_SymmetricSessionKeyPacket OpenPGP_TrustPacket OpenPGP_UserAttributePacket OpenPGP_UserIDPacket

Public Member Functions

 __construct ($data=NULL)
 
 read ()
 
 body ()
 
 header_and_body ()
 
 to_bytes ()
 
 read_timestamp ()
 
 read_mpi ()
 
 read_unpacked ($count, $format)
 
 read_byte ()
 
 read_bytes ($count=1)
 

Static Public Member Functions

static class_for ($tag)
 
static parse (&$input)
 Parses an OpenPGP packet. More...
 
static parse_new_format ($input)
 Parses a new-format (RFC 4880) OpenPGP packet. More...
 
static parse_old_format ($input)
 Parses an old-format (PGP 2.6.x) OpenPGP packet. More...
 

Public Attributes

 $tag
 
 $size
 
 $data
 

Static Public Attributes

static $tags
 

Detailed Description

OpenPGP packet.

See Also
http://tools.ietf.org/html/rfc4880#section-4.1
http://tools.ietf.org/html/rfc4880#section-4.3

Definition at line 404 of file openpgp.php.

Constructor & Destructor Documentation

OpenPGP_Packet::__construct (   $data = NULL)

Definition at line 489 of file openpgp.php.

Member Function Documentation

OpenPGP_Packet::body ( )

Definition at line 497 of file openpgp.php.

static OpenPGP_Packet::class_for (   $tag)
static

Definition at line 407 of file openpgp.php.

OpenPGP_Packet::header_and_body ( )

Definition at line 501 of file openpgp.php.

static OpenPGP_Packet::parse ( $input)
static

Parses an OpenPGP packet.

See Also
http://tools.ietf.org/html/rfc4880#section-4.2

Definition at line 417 of file openpgp.php.

static OpenPGP_Packet::parse_new_format (   $input)
static

Parses a new-format (RFC 4880) OpenPGP packet.

See Also
http://tools.ietf.org/html/rfc4880#section-4.2.2

Definition at line 442 of file openpgp.php.

static OpenPGP_Packet::parse_old_format (   $input)
static

Parses an old-format (PGP 2.6.x) OpenPGP packet.

See Also
http://tools.ietf.org/html/rfc4880#section-4.2.1

Definition at line 463 of file openpgp.php.

OpenPGP_Packet::read ( )

Definition at line 494 of file openpgp.php.

OpenPGP_Packet::read_byte ( )

Definition at line 537 of file openpgp.php.

OpenPGP_Packet::read_bytes (   $count = 1)

Definition at line 541 of file openpgp.php.

OpenPGP_Packet::read_mpi ( )
See Also
http://tools.ietf.org/html/rfc4880#section-3.2

Definition at line 523 of file openpgp.php.

OpenPGP_Packet::read_timestamp ( )
See Also
http://tools.ietf.org/html/rfc4880#section-3.5

Definition at line 516 of file openpgp.php.

OpenPGP_Packet::read_unpacked (   $count,
  $format 
)
See Also
http://php.net/manual/en/function.unpack.php

Definition at line 532 of file openpgp.php.

OpenPGP_Packet::to_bytes ( )

Definition at line 508 of file openpgp.php.

Member Data Documentation

OpenPGP_Packet::$data

Definition at line 405 of file openpgp.php.

OpenPGP_Packet::$size

Definition at line 405 of file openpgp.php.

OpenPGP_Packet::$tag

Definition at line 405 of file openpgp.php.

OpenPGP_Packet::$tags
static
Initial value:
= array(
1 => 'AsymmetricSessionKey',
2 => 'Signature',
3 => 'SymmetricSessionKey',
4 => 'OnePassSignature',
5 => 'SecretKey',
6 => 'PublicKey',
7 => 'SecretSubkey',
8 => 'CompressedData',
9 => 'EncryptedData',
10 => 'Marker',
11 => 'LiteralData',
12 => 'Trust',
13 => 'UserID',
14 => 'PublicSubkey',
17 => 'UserAttribute',
18 => 'IntegrityProtectedData',
19 => 'ModificationDetectionCode',
60 => 'Experimental',
61 => 'Experimental',
62 => 'Experimental',
63 => 'Experimental',
)

Definition at line 547 of file openpgp.php.