diff --git a/lib/openpgp.php b/lib/openpgp.php index 9849d1e..f99c24f 100644 --- a/lib/openpgp.php +++ b/lib/openpgp.php @@ -648,6 +648,15 @@ class OpenPGP_OnePassSignaturePacket extends OpenPGP_Packet { } $this->nested = ord($this->read_byte()); } + + function body() { + $body = chr($this->version).chr($this->signature_type).chr($this->hash_algorithm).chr($this->key_algorithm); + for($i = 0; $i < strlen($this->key_id); $i += 2) { + $body .= chr(hexdec($this->key_id{$i}.$this->key_id{$i+1})); + } + $body .= chr((int)$this->nested); + return $body; + } } /**