Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implement body for OpenPGP_OnePassSignaturePacket

  • Loading branch information...
commit 975fc2ff7ebc3492990e16e11fefd76d800de0ad 1 parent 0a85e21
@singpolyma singpolyma authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/openpgp.php
View
9 lib/openpgp.php
@@ -648,6 +648,15 @@ function read() {
}
$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;
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.