If you want to send someone a file of which the content you prefer to remain anonymous, you can send it in a password protected ZIP file.
It’s not 100% safe, it can still be brute forced and you probably shouldn’t be sending your banking details like this, but it can be useful to send along information this way.
To do so on a Mac, follow these steps (which should be easy if you’re familiar with the command line).
- Open your terminal/iTerm
- Go to your directory where you have the files/folders you want to zip:
cd ~/Desktop/files/
- Create the encrypted zip:
$ zip -P YourPass my_zip_file.zip your_original_file.docx adding: your_original_file.docx (stored 23%)
Note; if you type the zip
command in your shell with an extra space before the command, it won’t be saved in your bash history! Since you’re typing the password directly as a command-line argument, it poses a security risk of staying in your history files.
The zip -P
will be followed by the password for your ZIP file. The first argument after that is the name of your new, password protected, zip file and the second argument is the file or folder you want to encrypt.
Note: this article used to refer to the zip -e
command. This seems safer as it prompts you for your password (instead of typing it directly as an argument to zip -P
, but uses weak PKZip 2.0 encryption. The zip -P
uses standard encryption.