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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use *;
use Parser;
/// Simple, user-friendly, encryption commands.
///
/// Algae is a simplified profile of the excellent [age](https://age-encryption.org/v1) format.
///
/// It implements five functions for the most common operations, and tries to be as obvious and
/// hard-to-misuse as possible, without being prohibitively hard to use, and while retaining
/// forward-compatibility with age (all algae products can be used with age, but not all age
/// products may be used with algae).
///
/// To start with, generate a keypair with `algae keygen`. This will generate two files:
/// `identity.txt.age`, a passphrase-protected keypair, and `identity.pub`, the public key in plain.
///
/// To encrypt a file, use `algae encrypt -k identity.pub filename`. As this uses the public key, it
/// doesn't require a passphrase. The encrypted file is written to `filename.age`. To decrypt it,
/// use `algae decrypt -k identity.txt.age filename.age`. As this uses the secret key, it will
/// prompt for its passphrase. The decoded file is written back to `filename` (i.e. without the
/// `.age` suffix).
///
/// To obtain a plaintext `identity.txt` (i.e. to remove the passphrase), use
/// `algae reveal identity.txt.age`. To add a new passphrase on a plaintext identity, use
/// `algae protect identity.txt`. These commands are not special to identity files: you can
/// `protect` (encrypt) and `reveal` (decrypt) arbitrary files with a passphrase.
///
/// Every command has a short help (`-h`), which is useful to recall the name of options, and a
/// long help (`--help`), which contains more details and guide-level information.