function __construct($packet)
{
if (!is_object($packet)) {
$packet = OpenPGP_Message::parse($packet);
}
if ($packet instanceof OpenPGP_PublicKeyPacket || $packet[0] instanceof OpenPGP_PublicKeyPacket) {
// If it's a key (other keys are subclasses of this one)
$this->key = $packet;
} else {
$this->message = $packet;
}
}