openssl使用

ubuntu下openssl默认已经安装好了。以下使用test文件作为测试使用。

显示版本和编译参数:openssl version -a

查看支持的子命令: >openssl ?

SSL 密码组合列表: >openssl ciphers

产生 RSA 密钥对: >openssl genrsa -out test 1024

取出 RSA 公钥: >openssl rsa -in test -pubout -out test.pubkey

加密文件: >openssl enc -e -rc4 -in test -out test.enc

解密文件: >openssl enc -d -rc4 -in test.enc -out test.dec

计算文件的 MD5 值: >openssl md5 < test

计算文件的 SHA1 值: >openssl sha1 < test


参考文档:

http://blog.csdn.net/nodeathphoenix/article/details/7912934

http://conkeyn.iteye.com/blog/439202

posted on 2013-05-09 10:53  小尾巴猴子  阅读(183)  评论(0编辑  收藏  举报

导航