Awesome
Scytale is a simple wrapper library to make use of encryption with Go fast and easy.
Most of the credits goes to the wonderful go.crypto library.
Installation
Use go get
to install the package:
$ go get gopkg.in/matm/scytale.v1
Tools
The bin/aesenc
and bin/aeszip
CLI tools allow file encryption using
AES-256 operating in CBC mode,
password-based encryption (PBE)
and a PBKDF2 password-based key derivation function.
The former can be used to encrypt/decrypt a single file:
$ go install gopkg.in/matm/scytale.v1/bin/aesenc
$ aesenc -o out.enc myfile.pdf
$ aesenc -o myfile.pdf -d out.enc
The latter encrypts a bunch of files into a standard ZIP file:
$ go install gopkg.in/matm/scytale.v1/bin/aeszip
$ aeszip -o secure.zip *.pdf
Both aeszip -l
and unzip -l
can be used to list the content of the archive. All files within
the archive can be decrypted and extracted with
$ aeszip -x -o . secure.zip
The second file in the archive (position 1) can be decrypted and extracted with
$ aeszip -x -o . -n 1 secure.zip
See aeszip -h
output for usage.
API Docs
The API doc is available on GoDoc.
License
This is free software, see LICENSE.