Implement to_bytes for OpenPGP_Message
This commit is contained in:
parent
355ea44301
commit
0a85e214a6
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user