Revision 6bd61198fb28b454090890f8efd3f86adf8773cc authored by Dr. Stephen Henson on 20 November 2012, 00:29:09 UTC, committed by Dr. Stephen Henson on 20 November 2012, 00:29:09 UTC
1 parent 23b5e47
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 ...