OpenPGP_Message::to_bytes PHP Méthode

to_bytes() public méthode

public to_bytes ( )
    function to_bytes()
    {
        $bytes = '';
        foreach ($this as $p) {
            $bytes .= $p->to_bytes();
        }
        return $bytes;
    }

Usage Example

Exemple #1
0
 /**
  */
 public function __toString()
 {
     $bytes = $this->message->to_bytes();
     if (!strlen($this->_armor)) {
         return $bytes;
     }
     return OpenPGP::enarmor($bytes, 'PGP ' . $this->_armor, array_merge($this->headers, array('Version' => $this->armorVersion)));
 }