1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use Parser;
/// Plugin for age to interact with tlock encryption
///
/// INPUT defaults to standard input, and OUTPUT defaults to standard output.
///
/// ROUND can be:
/// * a specific round (123),
/// * a duration (30s),
/// * an RFC3339 date (2023-06-28 21:30:22)
///
/// REMOTE is a drand remote URL. You can find a non-exhaustive list on https://github.com/thibmeu/drand-rs#common-remotes.
///
/// Example:
/// $ age-plugin-tlock --generate --remote <URL> > fastnet.key
/// $ cat fastnet.key | grep 'recipient' | sed 's/.*\(age1.*\)/\1/' > fastnet.key.pub
/// $ tar cvz ~/data | ROUND="<ROUND>" age -R myremote.key.pub > data.tar.gz.age
/// $ age --decrypt -o data.tar.gz data.tar.gz.age