日期:2014-05-16 浏览次数:20803 次
$ echo "this is a test" > tmp
$ base64 < tmp
dGhpcyBpcyBhIHRlc3QK
$ echo dGhpcyBpcyBhIHRlc3QK
------解决方案--------------------
base64 -d
this is a test
$ echo "another test"
------解决方案--------------------
perl -e 'use MIME::Base64; $_ = encode_base64(<>); print;'
YW5vdGhlciB0ZXN0Cg==
$ echo YW5vdGhlciB0ZXN0Cg==
------解决方案--------------------
perl -e 'use MIME::Base64; $_ = decode_base64(<>); print;'
another test