Simple commandline encryption tool written in Go. Example of how to use AES encryption in Go (golang).
Go
Switch branches/tags
Nothing to show

README.md

crypter

Travis Build Status

Simple commandline encryption tool written in Go. Example of how to use AES encryption in Go (golang). I was motivated to build this to have a base64 output so I could pass as a parameter a one time use key to my server build scripts.

Install:

go get github.com/lateefj/crypter

Usage:

1a. First generate a key

crypter -gen > /tmp/test.key # Uses standard out

1b. Gerate key with base64 output and passing the file as a param

crypter -gen -b64out -out="/tmp/b64test.key"
  1. Create some data
echo "This is an experiment" > /tmp/data.txt
  1. Encrypt data with the a key
crypter -enc -key="/tmp/test.key" -in="/tmp/data.txt" -out="/tmp/enc_data.txt"
  1. Decrypt data with the key
crypter -dec -key="/tmp/test.key" -in="/tmp/enc_data.txt" -out="/tmp/dec_data.txt"

Standard out will be used if there is no -out parameter

TODO:

Make stdin work so could pip command together. Right now the read just support EOF