base64加密和解密
2016-02-11 00:57
501 查看
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。
使用源码包编译安装:
这个东西的配置似乎不对,还是不行
不过可以在解压后的路径里直接处理
[root@localhost base64-1.5]# echo "snailwarrior" | ./base64 | ./base64 -d
snailwarrior
这里的base64-1.5是文件夹
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 install base64 -d gfwlist.txt gfwlist_base64.txt
这个东西的配置似乎不对,还是不行
不过可以在解压后的路径里直接处理
[root@localhost base64-1.5]# echo "snailwarrior" | ./base64 | ./base64 -d
snailwarrior
这里的base64-1.5是文件夹
相关文章推荐
- js 通过function来定义函数
- JS笔记 入门第四
- 事件驱动模型的角度来看看 JAVA NIO
- JS笔记 入门第三
- HDU 5620 KK's Steel(斐波那契数列的巧妙应用)
- APP开发,如何选择靠谱的外包公司?
- 智慧北京开发第四天(上)
- ELK Stack搭建和使用中的一些小记录
- ubuntu下设置环境变量的三种方法【转】
- apache commons io 发行审查工具结果
- 关于DreamWeaver CS6.0 + PhoneGap 之移动开发环境搭建
- Linux内核的起步
- 2016.2.11
- vmstat命令各项解释
- Git远程操作详解
- Android音乐播放器高级开发
- 微信导致手机死机 、 挂起 、 无响应 、反复重启
- Linux进程 -- wait/waitpid函数
- 基于lnmp搭建discuz论坛登陆管理员页面的双重认证
- apache commons io 可靠性报告