feat: v0.9.0, support secure editor

This commit is contained in:
2023-12-02 12:20:28 +08:00
parent 1e2f13e0b8
commit 9e36725908
6 changed files with 31 additions and 7 deletions

View File

@@ -24,6 +24,18 @@ Compile only encrypt:
cargo build --release --no-default-features
```
Edit encrypted file:
```shell
tiny-encrypt decrypt --edit-file sample.txt.tinyenc
```
Read environment `EDITOR` or `SECURE_EDITOR` to edit file, `SECURE_EDITOR` write encrypted file to temp file.
Secure editor command format:
```shell
$SECURE_EDITOR <temp-file-name> "aes-256-gcm" <temp-key-hex> <temp-nonce-hex>
```
<br>
Encrypt config `~/.tinyencrypt/config-rs.json`: