Implement body for OpenPGP_OnePassSignaturePacket

This commit is contained in:
Stephen Paul Weber 2010-03-31 14:25:21 -05:00
parent 0a85e214a6
commit 975fc2ff7e
1 changed files with 9 additions and 0 deletions

View File

@ -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;
}
}
/**