「OpenSSL」:修訂間差異

出自Gea-Suan Lin's Wiki
跳至導覽 跳至搜尋
本頁面具有訪問限制。如果您看見此訊息,這代表您沒有訪問本頁面的權限。
行 8: 行 8:
openssl enc -bf-cbc -pbkdf2 -in a.tgz -out a.tgz.bf-cbc
openssl enc -bf-cbc -pbkdf2 -in a.tgz -out a.tgz.bf-cbc
openssl enc -d -bf-cbc -pbkdf2 -in a.tgz.bf-cbc -out a.tgz
openssl enc -d -bf-cbc -pbkdf2 -in a.tgz.bf-cbc -out a.tgz
</syntaxhighlight>
值得注意的是,OpenSSL在1.1.0後修改了digest演算法(從<code>md5</code>變成<code>sha-256</code>),所以處理舊的檔案時需要指定<code>md5</code>:
<syntaxhighlight lang="bash">
openssl enc -d -bf-cbc -md md5 -in a.tgz.bf-cbc -out a.tgz
</syntaxhighlight>
</syntaxhighlight>



於 2023年2月17日 (五) 04:30 的修訂

OpenSSL是一套綜合各種密碼學演算法的軟體。

範例

加密與解密,這邊開了-pbkdf2

openssl enc -bf-cbc -pbkdf2 -in a.tgz -out a.tgz.bf-cbc
openssl enc -d -bf-cbc -pbkdf2 -in a.tgz.bf-cbc -out a.tgz

值得注意的是,OpenSSL在1.1.0後修改了digest演算法(從md5變成sha-256),所以處理舊的檔案時需要指定md5

openssl enc -d -bf-cbc -md md5 -in a.tgz.bf-cbc -out a.tgz

外部連結