Skip to content

Commit

Permalink
docs(readme): shorter secret explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdoret committed Jul 23, 2024
1 parent ad5a92e commit a0e6fbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,7 @@ Pseudonymization requires an RDF file, index and config as input:
tripsu pseudo --index index.nt --config rules.yaml input.nt > output.nt
```

>[!NOTE]
> By default, pseudonymization uses a random seed. To make the process deterministic, you may provide a secret.
```shell
echo "The quick brown fox jumps over the lazy dog" > secret.txt
tripsu pseudo -s secret.txt -x index.nt -c rules.yaml input.nt > output.nt
```
By default, pseudonymization uses a random key. To make the process deterministic, you may provide a file containing a fixed key with `--secret`.

In both subcommands, the input defaults to stdin and the output to stdout,
allowing to pipe both up- and downstream `tripsu` (see next section).
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ struct PseudoArgs {
#[arg(short, long, default_value = "-")]
output: PathBuf,

/// File containing the key used to generate pseudonyms.
/// Defaults to a random key.
/// File containing the secret used to generate pseudonyms.
/// Default is to use a random key.
#[arg(short, long, default_value=None)]
secret: Option<PathBuf>,
}
Expand Down

0 comments on commit a0e6fbb

Please sign in to comment.