linux下使用openssl命令行加密文件

来源:互联网 发布:存放字符串的数组 编辑:程序博客网 时间:2024/05/26 17:48

OS: ubuntu 12.04


命令行输入openssl,进入openssl命令行状态

# openssl

OpenSSL>

" 加密文件 -e (加密) -aes-128-cbc(加密算法)

OpenSSL> enc -e -aes-128-cbc -in <input file path> -out <output file path>

“ 输入加密密码,回车

enter aes-128-cbc encryption password:

” 再次输入密码,回车

Verifying - enter aes-128-cbc encryption password:

加密OK!!


" 解密文件 -d (加密) -aes-128-cbc(加密算法)

OpenSSL> enc -d -aes-128-cbc -in <input file path> -out <output file path>

“ 输入加密密码,回车

enter aes-128-cbc decryption password:


解密OK!!

0 0