使用openssl命令進行加密解密及雜湊運算的命令列
阿新 • • 發佈:2019-02-05
/*********************************************************************
* Author : Samson
* Date : 01/05/2014
* Test platform:
* 3.6.10-4.fc18.i686.PAE
* GNU bash, version 4.2.39
* *******************************************************************/
加密的結果為ascii碼的加密與解密:
openssl enc -aes-128-cbc -e -a -in yygy/in.txt -out dj.txt -K c286696d887c9aa0611bbb3e2025a45a -iv 562e17996d093d28ddb3ba695a2e6f58
openssl enc -aes-128-cbc -d -a -in dj.txt -out dedj.txt -K c286696d887c9aa0611bbb3e2025a45a -iv 562e17996d093d28ddb3ba695a2e6f58
加密的結果為二進位制檔案的加密與解密:
openssl enc -aes-128-cbc -e -in yygy/in.txt -out dj.txt -K c286696d887c9aa0611bbb3e2025a45a -iv 562e17996d093d28ddb3ba695a2e6f58
openssl enc -aes-128-cbc -d -in dj.txt -out dedj.txt -K c286696d887c9aa0611bbb3e2025a45a -iv 562e17996d093d28ddb3ba695a2e6f58
md5:
openssl dgst -md5 dj.txt
* Author : Samson
* Date : 01/05/2014
* Test platform:
* 3.6.10-4.fc18.i686.PAE
* GNU bash, version 4.2.39
* *******************************************************************/
加密的結果為ascii碼的加密與解密:
openssl enc -aes-128-cbc -e -a -in yygy/in.txt -out dj.txt -K c286696d887c9aa0611bbb3e2025a45a -iv 562e17996d093d28ddb3ba695a2e6f58
openssl enc -aes-128-cbc -d -a -in dj.txt -out dedj.txt -K c286696d887c9aa0611bbb3e2025a45a -iv 562e17996d093d28ddb3ba695a2e6f58
加密的結果為二進位制檔案的加密與解密:
openssl enc -aes-128-cbc -e -in yygy/in.txt -out dj.txt -K c286696d887c9aa0611bbb3e2025a45a -iv 562e17996d093d28ddb3ba695a2e6f58
openssl enc -aes-128-cbc -d -in dj.txt -out dedj.txt -K c286696d887c9aa0611bbb3e2025a45a -iv 562e17996d093d28ddb3ba695a2e6f58
md5:
openssl dgst -md5 dj.txt