Permalink
Browse files

Implement to_bytes for OpenPGP_Message

  • Loading branch information...
1 parent 355ea44 commit 0a85e214a620f211d2d15ee31eb8a5d07eeae8cc @singpolyma singpolyma committed Mar 31, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/openpgp.php
View
@@ -141,6 +141,14 @@ function __construct(array $packets = array()) {
$this->packets = $packets;
}
+ function to_bytes() {
+ $bytes = '';
+ foreach($this as $p) {
+ $bytes .= $p->to_bytes();
+ }
+ return $bytes;
+ }
+
// IteratorAggregate interface
function getIterator() {

0 comments on commit 0a85e21

Please sign in to comment.