Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 27-Oct-2014 | - | ||||
README.md | H A D | 27-Oct-2014 | 1.4 KiB | 71 | 51 | |
cmd.go | H A D | 27-Oct-2014 | 3.1 KiB | 157 | 143 | |
main.go | H A D | 27-Oct-2014 | 1.1 KiB | 56 | 48 |
README.md
1# crypt 2 3## Install 4 5### Binary release 6 7``` 8wget https://github.com/xordataexchange/crypt/releases/download/v0.0.1/crypt-0.0.1-linux-amd64 9mv crypt-0.0.1-linux-amd64 /usr/local/bin/crypt 10chmod +x /usr/local/bin/crypt 11``` 12 13### go install 14 15``` 16go install github.com/xordataexchange/crypt/bin/crypt 17``` 18 19## Backends 20 21crypt supports etcd and consul as backends via the `-backend` flag. 22 23## Usage 24 25``` 26usage: crypt COMMAND [arg...] 27 28commands: 29 get retrieve the value of a key 30 set set the value of a key 31``` 32 33### Encrypted and set a value 34 35``` 36usage: crypt set [args...] key file 37 -backend="etcd": backend provider 38 -endpoint="": backend url 39 -keyring=".pubring.gpg": path to armored public keyring 40``` 41 42Example: 43 44``` 45crypt set -keyring pubring.gpg /app/config config.json 46``` 47 48### Retrieve and decrypted a value 49 50``` 51usage: crypt get [args...] key 52 -backend="etcd": backend provider 53 -endpoint="": backend url 54 -secret-keyring=".secring.gpg": path to armored secret keyring 55``` 56 57Example: 58 59``` 60crypt get -secret-keyring secring.gpg /app/config 61``` 62 63### Support for unencrypted values 64``` 65crypt set -plaintext ... 66crypt get -plaintext ... 67``` 68Crypt now has support for getting and setting plain unencrypted values, as 69a convenience. This was added to the backend libraries so it could be exposed 70in spf13/viper. Use the -plaintext flag to get or set a value without encryption. 71