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
1 changed files with 1 additions and 1 deletions

View File

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