static function parse_string($input)
{
$msg = new self();
while (($length = strlen($input)) > 0) {
if ($packet = OpenPGP_Packet::parse($input)) {
$msg[] = $packet;
}
if ($length == strlen($input)) {
// is parsing stuck?
break;
}
}
return $msg;
}