openpgp-php/lib/OpenPgP/SignaturePacket/IssuerPacket.php

27 lines
492 B
PHP
Raw Normal View History

2020-06-07 06:25:59 +00:00
<?php
namespace Leenooks\OpenPGP\SignaturePacket;
/**
* @see http://tools.ietf.org/html/rfc4880#section-5.2.3.5
*/
class IssuerPacket extends Subpacket
{
protected $tag = 16;
function body()
{
$bytes = '';
for($i = 0; $i < strlen($this->data); $i += 2) {
2020-06-18 12:03:56 +00:00
$bytes .= chr(hexdec($this->data[$i].$this->data[$i+1]));
2020-06-07 06:25:59 +00:00
}
return $bytes;
}
function read()
{
for($i = 0; $i < 8; $i++) { // Store KeyID in Hex
$this->data .= sprintf('%02X',ord($this->read_byte()));
}
}
}