How to Use Cryptr to Encrypt Your Files Like a Pro (Bash Script)

Cryptr is a handy bash script that allows you to encrypt and decrypt your sensitive files in no time, all neatly and with top-notch security thanks to OpenSSL AES-256.

If, like me, you tend to store a bunch of confidential data on your computer (passwords, personal documents, compromising photos from your last costume party…), you know how important it is to protect them from prying eyes. Okay, we’re not all paranoid to the point of fearing the NSA or someone snooping through our files, but you can never be too careful!

With this tool, you can say goodbye to the hassle of setting up complicated encryption solutions. Simply clone the project from the GitHub repository:

git clone https://github.com/nodesocket/cryptr.git

Next, create a symbolic link to the cryptr.bash script so you can easily use it from anywhere:

ln -s "$PWD"/cryptr/cryptr.bash /usr/local/bin/cryptr

And that’s it, you’re ready to encrypt your little secrets like a pro! The encrypt command allows you to encrypt a file by adding the .aes extension, while decrypt does the opposite.

➜ cryptr encrypt ./secret-file
enter aes-256-cbc encryption password: 
Verifying - enter aes-256-cbc encryption password: 
➜ ls -alh
-rw-r--r-- 1 user group 1.0G Oct 1 13:33 secret-file
-rw-r--r-- 1 user group 1.0G Oct 1 13:34 secret-file.aes

You can even set the password to use via the CRYPTR_PASSWORD environment variable to automate the process:

➜ CRYPTR_PASSWORD=password007 cryptr encrypt ./secret-file

Honestly, it’s so simple and effective that even James Bond could make it his favorite tool. In short, if you’re looking for a simple and effective encryption solution to protect your sensitive data, I really recommend trying Cryptr.

Mohamed SAKHRI
Mohamed SAKHRI

I'm the creator and editor-in-chief of Tech To Geek. Through this little blog, I share with you my passion for technology. I specialize in various operating systems such as Windows, Linux, macOS, and Android, focusing on providing practical and valuable guides.

Articles: 1751

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *