How to Encrypt a File on the Command Line

(1) Install this CLI:

# Install peacemakr
brew tap peacemakr-io/peacemakr
brew install peacemakr

(2) Authenticate to fetch your encryption keys:

# Authenticate to Peacemakr's Demo Org for access to demo keys
export PEACEMAKR_APIKEY=d1Maw58P2xCQ8d0GV15n22SQNI6lYXHzWLCTEvNPHnY=

(3) Encrypt your file:

peacemakr -encrypt --inputFileName to-encrypt.txt --outputFileName encrypted.txt

Decrypt your file:

peacemakr -decrypt --inputFileName encrypted.txt --outputFileName decrypted.txt

Or even Encrypt and Decrypt with standard input:

echo "Hello Encrypted World" | peacemakr -encrypt

Wait a Second. What is Peacemakr?

Ok. But what key was just used to encrypt?

Sounds Complex? It is.

Can I encrypt and decrypt offline?

Is there an SDK to programmatically encrypt and decrypt data?

Free Tier? What’s the catch?

Where can I learn more?

--

--

--

Ex-Apple, Director of Security Architecture at Robinhood. Lives in San Francisco. Plant-based Health Nut, Podcaster, Motorcycle Rider, Runner, and Biker

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How Does Lifeline Australia Use Your Data?

haclHackthebox Devel Writeup

TI Rating Report: StaFi Protocol

{UPDATE} 脱出ゲーム四月の嘘ウィルス Hack Free Resources Generator

Chargers are coming back live in 24 hours

Why Should I Care About Privacy? I Have Nothing to Hide.

Are Targeted Advertisements Ethical?

Using Titan Security Key to protect your Google Cloud account

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jon McLachlan

Jon McLachlan

Ex-Apple, Director of Security Architecture at Robinhood. Lives in San Francisco. Plant-based Health Nut, Podcaster, Motorcycle Rider, Runner, and Biker

More from Medium

CDK Example — How to create a S3 secure Bucket resource

Building a Minecraft Server in the Cloud for $2 a Month

The magical world of containers — Docker

AutoScaling Status check vs Health check? Which one is suitable for u?