Debian Codegraph @

bin/crypt/README.md

raw
1 # crypt
2
3 ## Install
4
5 ### Binary release
6
7 ```
8 wget https://github.com/xordataexchange/crypt/releases/download/v0.0.1/crypt-0.0.1-linux-amd64
9 mv crypt-0.0.1-linux-amd64 /usr/local/bin/crypt
10 chmod +x /usr/local/bin/crypt
11 ```
12
13 ### go install
14
15 ```
16 go install github.com/xordataexchange/crypt/bin/crypt
17 ```
18
19 ## Backends
20
21 crypt supports etcd and consul as backends via the `-backend` flag.
22
23 ## Usage
24
25 ```
26 usage: crypt COMMAND [arg...]
27
28 commands:
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 ```
36 usage: 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
42 Example:
43
44 ```
45 crypt set -keyring pubring.gpg /app/config config.json
46 ```
47
48 ### Retrieve and decrypted a value
49
50 ```
51 usage: 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
57 Example:
58
59 ```
60 crypt get -secret-keyring secring.gpg /app/config
61 ```
62
63 ### Support for unencrypted values
64 ```
65 crypt set -plaintext ...
66 crypt get -plaintext ...
67 ```
68 Crypt now has support for getting and setting plain unencrypted values, as
69 a convenience. This was added to the backend libraries so it could be exposed
70 in spf13/viper. Use the -plaintext flag to get or set a value without encryption.