В начало → Unix Toolbox → 9. ENCRYPT FILES |
Encrypt and decrypt:
# openssl des -salt -in file -out file.des
# openssl des -d -salt -in file.des -out file
Note that the file can of course be a tar archive.
# tar -cf - directory | openssl des -salt -out directory.tar.des # Encrypt
# openssl des -d -salt -in directory.tar.des | tar -x # Decrypt
# tar -zcf - directory | openssl des -salt -out directory.tar.gz.des # Encrypt
# openssl des -d -salt -in directory.tar.gz.des | tar -xz # Decrypt
• Use -k mysecretpassword after des to avoid the interactive password request. However note that this is highly insecure.
• Use des3 instead of des to get even stronger encryption (Triple-DES Cipher). This uses also more CPU.
В начало → Unix Toolbox → 9. ENCRYPT FILES |