在linux上处理base64加密和解密
http://snailwarrior.blog.51cto.com/680306/142472/
2.從標準輸入讀取文件內容,base64編碼并打印到標準輸出
[root@localhost test]# base64
snailwarrior
c25haWx3YXJyaW9yCg==
我是輸入snailwarrior,回車,然后按Ctrl+D結束文件輸入的。
?
3、對字符串"snailwarrior"編碼,并打印到標準輸出
[root@localhost test]# echo "snailwarrior" | base64
c25haWx3YXJyaW9yCg==
?
4、Base64解碼
[root@localhost test]# echo "snailwarrior" | base64 | base64 -d
snailwarrior
base64: invalid input
?
http://www.centoscn.com/CentosBug/osbug/2013/0813/1229.html
RHEL5自帶的base64工具有BUG,base64解碼時莫名出錯:base64: invalid input。
使用源碼包編譯安裝:
?
wget http://www.fourmilab.ch/webtools/base64/base64-1.5.tar.gz tar zxf base64-1.5.tar.gz cd base64-1.5 ./configure make && make -n installbase64 -d gfwlist.txt gfwlist_base64.txt這個東西的配置似乎不對,還是不行
?
不過可以在解壓后的路徑里直接處理
[root@localhost base64-1.5]# echo "snailwarrior" | ./base64 | ./base64 -d
snailwarrior
這里的base64-1.5是文件夾
?
轉載于:https://www.cnblogs.com/chucklu/p/5186254.html
總結
以上是生活随笔為你收集整理的在linux上处理base64加密和解密的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python浅拷贝深拷贝
- 下一篇: Hungary(匈牙利算法)——二分图最