From fb671e183d1850591026b50e670a72bd2c5740f3 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 20 Nov 2018 20:22:24 -0500 Subject: [PATCH] Wordwrap enarmor output Closes #74 --- lib/openpgp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/openpgp.php b/lib/openpgp.php index 65a157d..4ce8382 100644 --- a/lib/openpgp.php +++ b/lib/openpgp.php @@ -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;