A simple secret manager.
Manage encrypted secrets stored in a file. Uses the ChaCha20Poly1305 algorithm.
cargo install secr
secr keyExample:
$ secr key
Generated key (base64):
2Af8Ty6PG9ICZppnY5cB8GMPdNg4NubxU4HyPEx1h0E=
secr encrypt --key '<symmetric_key>' '<plaintext>'Output is preformatted in YAML. Example:
$ secr encrypt --name 'hello_world' --key '2Af8Ty6PG9ICZppnY5cB8GMPdNg4NubxU4HyPEx1h0E=' 'mysecret'
hello_world:
nonce: 'qt+WBOWfII63uI9q'
ciphertext: 'qTEMbZ5SZVox7Mmsc61cXbEbzYuKVO1u'
Example:
cat >> secrets.yaml << 'EOF'
hello_world:
nonce: 'qt+WBOWfII63uI9q'
ciphertext: 'qTEMbZ5SZVox7Mmsc61cXbEbzYuKVO1u'
EOFsecr decrypt --file '<store_path>' --key '<symmetric_key>' '<secret_name>'Example:
$ secr decrypt --file secrets.yaml --key '2Af8Ty6PG9ICZppnY5cB8GMPdNg4NubxU4HyPEx1h0E=' 'hello_world'
UTF-8 encoding:
mysecret
Base64 encoding:
bXlzZWNyZXQ=
This package follows the Semantic Versioning convention.
Licensed under the MIT license.