Revision aabbe99fcb802c3c6d4425c3a5f4143f2616e9ed authored by Dr. Stephen Henson on 05 June 2014, 07:56:20 UTC, committed by Dr. Stephen Henson on 05 June 2014, 08:04:27 UTC
1 parent 8011cd5
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 ...