Let’s say you want to store sensitive files on a flash drive, or maybe send it out via email, or whatever the case may be. You’ll probably want to encrypt that file.
There’s a bunch of apps ( free or paid ) that can do that for you, but there’s also an easy way to do that using a built-in Mac app… the terminal.
Jump over the break to learn how to easily encrypt/decrypt files….
1. Open Terminal
2. Type openssl enc -aes-256-cbc -e -in *path-to-file-you-want-to-encrypt* -out *path-to-where-the-encrypted-file-will-be-saved*
NOTE: You can drag and drop the file you want to encrypt instead of manually typing in the path. You can do it again for the output encrypted file, but change the name of the file ( i.e from pdf.pdf to output.pdf ).
3. Type in the password for your encryption ( you will not be able to see what you’re typing )
3.1 You need to type the password twice
4. That’s it, your encrypted file is now saved, and you can’t open it without decrypting it first.
Now let’s see how to decrypt the file…
1. Open up terminal
2. Type openssl enc -aes-256-cbc -d -in *path-to-file-you-want-to-encrypt* -out *path-to-where-the-encrypted-file-will-be-saved*
3. Type in the password, and you’re done
Let’s recap… Here we’re encrypting a .pdf file. The .pdf is saved on the desktop and the encrypted file will also be saved on the desktop.
1. openssl enc -aes-256-cbc -e -in /Users/murdafsm/Desktop/pdf.pdf -out /Users/murdafsm/Desktop/output.pdf ( note that i changed the file name for the output )
2. Type in the password twice and I’m done.
Let’s decrypt the file…
1. openssl enc -aes-256-cbc -d -in /Users/murdafsm/Desktop/output.pdf -out /Users/murdafsm/Desktop/output1.pdf ( note that i changed the output filename again )
2. Type in the password and you’re done.