如何使用OpenSSL加密/解密文件? [英] How to use OpenSSL to encrypt/decrypt files?
本文介绍了如何使用OpenSSL加密/解密文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用OpenSSL?
解决方案
这是google的问题的最高答案:
http://tombuntu.com/index.php/2007/12/12/simple-file-encryption-with-openssl/
加密:
openssl aes-256-cbc -a -salt -in secrets .txt -out secrets.txt.enc
解密:
openssl aes-256-cbc -d -a -in secrets.txt.enc -out secrets.txt.new
/ pre>
但是这根本没有使用公钥基础设施,所以有点像用螺丝刀敲击钉子: - )
I want to crypt and decrypt one file using one password.
How can I use OpenSSL to do that?
解决方案This is the top answer to your question from google: http://tombuntu.com/index.php/2007/12/12/simple-file-encryption-with-openssl/
Encrypt:
openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc
Decrypt:
openssl aes-256-cbc -d -a -in secrets.txt.enc -out secrets.txt.new
But this does not make use of the public key infrastructure at all, so a bit like hammering in a nail with a screwdriver :-)
这篇关于如何使用OpenSSL加密/解密文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文