Simple go data/password encryptor.
go in version 1.22
gopass
requires go1.22 to install successfully.
go install -v github.com/michalswi/gopass@latest
You can also get macos
or linux
binary from releases.
This will display help for the tool.
gopass -h
# create dummy data file
$ date >> data.txt
$ cat data.txt
Thu Mar 14 12:44:18 CET 2024
Thu Mar 14 12:44:19 CET 2024
Thu Mar 14 12:44:19 CET 2024
# generate secret key
$ gopass -g
┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐
│ ┬│ │├─┘├─┤└─┐└─┐
└─┘└─┘┴ ┴ ┴└─┘└─┘
v0.1.0 - @michalswi
secret: r10jNonOY5gHOESvbig1Wpkb5baSoKyZ
# encrypt data
$ gopass -e r10jNonOY5gHOESvbig1Wpkb5baSoKyZ data.txt
┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐
│ ┬│ │├─┘├─┤└─┐└─┐
└─┘└─┘┴ ┴ ┴└─┘└─┘
v0.1.0 - @michalswi
Encrypting data.
Encrypted file: 'encrypted.dat'.
# decrypt data
$ gopass -d r10jNonOY5gHOESvbig1Wpkb5baSoKyZ encrypted.dat
┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐
│ ┬│ │├─┘├─┤└─┐└─┐
└─┘└─┘┴ ┴ ┴└─┘└─┘
v0.1.0 - @michalswi
Decrypting data.
Decrypted file: 'decrypted.dat'.
$ cat decrypted.dat
Thu Mar 14 12:44:18 CET 2024
Thu Mar 14 12:44:19 CET 2024
Thu Mar 14 12:44:19 CET 2024
Keep in mind that secret key written in console can be later on read from:
$ cat ~/.*_history