OpenPGP_Crypt_RSA::__construct PHP Method

__construct() public method

Construct a wrapper object from a key or a message packet
public __construct ( $packet )
    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;
        }
    }