Current Path : /usr/src/crypto/openssl/demos/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/src/crypto/openssl/demos/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";