加密
openssl enc -e -aes256 -in pwd -out pwd
解密
openssl enc -d -aes256 -in pwd -out pwd
測試
[email protected]:~/$ cat file
This is a file.
[email protected]:~/$ openssl enc -e -aes256 -in file -out file_lock
enter aes-256-cbc encryption password:
Verifying - enter aes-256-cbc encryption password:
[email protected]:~/$ ls
file file_lock
[email protected]:~/$ openssl enc -d -aes256 -in file_lock -out file_unlock
[email protected]:~/$ ls
file file_lock file_unlock
[email protected]:~/$ cat file_unlock
This is a file.
[email protected]:~/$