-salt : Adds random data to the password hash to protect against brute-force attacks.
Use the following command to compress a directory and encrypt it with the AES-256 algorithm: password protect tar.gz file
Alternatively, decrypt it back into a standard .tar.gz file first: gpg -d secure_archive.tar.gz.gpg > archive.tar.gz Use code with caution. Method 2: Using OpenSSL -salt : Adds random data to the password
This creates a new, encrypted file named archive.tar.gz.gpg . Create and Encrypt in a Single Step password protect tar.gz file
# Create a password-protected zip archive zip -r -P "your_password" protected_archive.zip /path/to/directory