Yikes! This post is over a year old!
If you think it deserves a rewrite please get in touch or leave a comment.
— Thanks, Ash.
Firstly, open a Finder window and locate the file you want to encrypt.
Now, open a new Terminal. You can find this by opening spotlight using CMD+SPACE
and searching for “Terminal”. When you find Terminal.app, press ENTER
to open it.
Using the ‘zip’ command and a few options, we can quickly and easily zip up a file or directory and then encrypt it with a password.
In your terminal, start off by typing zip -eT
this first part of the command includes the name of the program we want to run ( zip
) and then two options. -e
means ‘encrypt the file’, and -T
means to test the file after it was encrypted to ensure it can be unzipped. After -eT
comes the name of the output zip file. This can be called anything you like, just make sure it has .zip
at the end. Finally. Add a space after the zip bit then drag the file you want to encrypt from Finder into Terminal.
It should look something like this:
zip -eT my-encrypted.zip /Users/a.davies/Desktop/my-sensitive-document.docx
If yours looks similar, press ENTER
and you’ll be prompted to enter a password, then asked to verify the same password again.
NOTE: the password you enter should be the encryption password that you will share with your recipient.
Once the command has completed, you can type open .
to open a Finder window to the folder that contains your newly encrypted zip file!
If you want to zip up and encrypt an entire folder and everything in it, the command is only slightly different. Follow the same process but when it comes to adding -eT
to the command you can add an r
(-eTr
), and instead of dragging the file from Finder to the Terminal, you can drag the whole folder instead!
It might look something like this:
zip -eTr my-encrypted.zip /Users/a.davies/Desktop/secret-folder/
Once your zip files have been created, you can attach them to emails and send them out. When it comes to sending the password, you should choose an alternative method (instead of email). Maybe inform your recipient what the password is over the phone!
NEVER share the password to the zip file in the same email thread that you attached the encrypted files!