How to Encrypt and Decrypt a .zip file on MacOS

Viewed 493

I had a requirement to compress a folder/directory and also encrypt it. And when needed i've to decrypt it. I did browse a lot to find a working answer on a MacOs. And i just manage to use the below steps to make it working.

  1. Zip or tar zip the file/directory using zip or tar czf linux command

  2. use "gpg --encrypt sample-file-or-folder.zip" Prompts you to enter the passphrase

  3. Outcome of step 2, should result in sample-file-or-folder.zip.gpg

  4. For decrypting .zip.gpg file use "gpg --output sample-file-or-folder.zip --decrypt sample-file-or-folder.zip.gpg" --> This prompts you to enter the passphrase. Please note that if you don't mention "--output" it will not get the desired output.

Is there any other better way to get the desired result ?

0 Answers
Related