diff --git a/lib/openpgp.php b/lib/openpgp.php index 7cbb9df..9849d1e 100644 --- a/lib/openpgp.php +++ b/lib/openpgp.php @@ -141,6 +141,14 @@ class OpenPGP_Message implements IteratorAggregate, ArrayAccess { $this->packets = $packets; } + function to_bytes() { + $bytes = ''; + foreach($this as $p) { + $bytes .= $p->to_bytes(); + } + return $bytes; + } + // IteratorAggregate interface function getIterator() {