Revision 65e4dca40cb15f3acc878e26d734ec93bd367dca authored by Dr. Stephen Henson on 27 June 2014, 15:58:41 UTC, committed by Dr. Stephen Henson on 27 June 2014, 15:58:41 UTC
1 parent ff4cfc4
b64.pl
#!/usr/local/bin/perl
#
# Make PEM encoded data have lines of 64 bytes of data
#
while (<>)
{
if (/^-----BEGIN/ .. /^-----END/)
{
if (/^-----BEGIN/) { $first=$_; next; }
if (/^-----END/) { $last=$_; next; }
$out.=$_;
}
}
$out =~ s/\s//g;
$out =~ s/(.{64})/$1\n/g;
print "$first$out\n$last\n";

Computing file changes ...