securefile
is a simple golang library for encrypting and decrypting files.
To install the package, run:
go get -v github.com/deeper-x/securefile
To encrypt data, run:
import "github.com/deeper-x/securefile"
key := "<YOUR PASSWD>"
_, err := securefile.Encrypt("/path/to/resource", []byte(key))
if err != nil {
panic(err)
}
To decrypt data, run:
import "github.com/deeper-x/securefile"
key := "<YOUR PASSWD>"
_, err := securefile.Decrypt("/path/to/resource", []byte(key))
if err != nil {
panic(err)
}
go test -v ./...