Wordwrap enarmor output

Closes #74
This commit is contained in:
Stephen Paul Weber 2018-11-20 20:22:24 -05:00
parent f43fbdc053
commit fb671e183d

View File

@ -30,7 +30,7 @@ class OpenPGP {
foreach ($headers as $key => $value) {
$text .= $key . ': ' . (string)$value . "\n";
}
$text .= "\n" . base64_encode($data);
$text .= "\n" . wordwrap(base64_encode($data), 76, "\n", true);
$text .= "\n".'=' . base64_encode(substr(pack('N', self::crc24($data)), 1)) . "\n";
$text .= self::footer($marker) . "\n";
return $text;