Update objects to use __toString()
This commit is contained in:
@@ -38,9 +38,15 @@ class PublicKeyPacket extends Packet
|
||||
|
||||
function __construct($key=[],$algorithm='RSA',$timestamp=NULL,$version=4)
|
||||
{
|
||||
if (self::$DEBUG)
|
||||
dump(['CREATE'=>__METHOD__,'key'=>$key,'alg'=>$algorithm,'ts'=>$timestamp,'version'=>$version]);
|
||||
|
||||
parent::__construct();
|
||||
|
||||
if ($key instanceof PublicKeyPacket) {
|
||||
if (self::$DEBUG)
|
||||
dump('key is PublicKeyPacket');
|
||||
|
||||
$this->algorithm = $key->algorithm;
|
||||
$this->key = array();
|
||||
|
||||
@@ -56,6 +62,9 @@ class PublicKeyPacket extends Packet
|
||||
$this->v3_days_of_validity = $key->v3_days_of_validity;
|
||||
|
||||
} else {
|
||||
if (self::$DEBUG)
|
||||
dump(['key'=>$key]);
|
||||
|
||||
$this->key = $key;
|
||||
if (is_string($this->algorithm = $algorithm)) {
|
||||
$this->algorithm = array_search($this->algorithm,self::$algorithms);
|
||||
|
Reference in New Issue
Block a user