diff options
author | Rob Austein <sra@hactrn.net> | 2006-10-09 16:00:16 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2006-10-09 16:00:16 +0000 |
commit | eb9264fc2ef786e8c4e3d430834b9b9e9e0b9c0a (patch) | |
tree | a72b0dcff12c4934f29502390553f0b2305b05fa /openssl/vendor/0.9.8d/demos/b64.pl | |
parent | 3a6e89edc0a52c58e2c08d3de4e360de777f14a7 (diff) |
OpenSSL 0.9.8d base code import
svn path=/openssl/vendor/0.9.8d/CHANGES; revision=373
Diffstat (limited to 'openssl/vendor/0.9.8d/demos/b64.pl')
-rw-r--r-- | openssl/vendor/0.9.8d/demos/b64.pl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openssl/vendor/0.9.8d/demos/b64.pl b/openssl/vendor/0.9.8d/demos/b64.pl new file mode 100644 index 00000000..8aa5fb46 --- /dev/null +++ b/openssl/vendor/0.9.8d/demos/b64.pl @@ -0,0 +1,20 @@ +#!/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"; + + |