diff options
| author | Jack O'Connor <[email protected]> | 2021-02-28 19:46:33 -0500 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2021-02-28 20:05:40 -0500 |
| commit | 320affafc11132d92f5274ae82dde37f3db3ef58 (patch) | |
| tree | 8eea2f53418f66781fa67cd652b25d019d0f237c /b3sum/src/main.rs | |
| parent | 71d67e081028972790d4b56e23dc57805aa78a85 (diff) | |
rename the "context string" to the "purpose string"purpose_string
Apart from being pretty ambiguous in general, the term "context string"
has the specific problem that it isn't clear whether it should be
describing the input or the output. In fact, it's quite important that
it describes the output, because the whole point is to domain-separate
different outputs that derive from the *same* input. To make that
clearer, rename the "context string" to the "purpose string" in
documentation.
Diffstat (limited to 'b3sum/src/main.rs')
| -rw-r--r-- | b3sum/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/b3sum/src/main.rs b/b3sum/src/main.rs index b01e5de..30b7efe 100644 --- a/b3sum/src/main.rs +++ b/b3sum/src/main.rs @@ -74,10 +74,10 @@ impl Args { .long(DERIVE_KEY_ARG) .conflicts_with(KEYED_ARG) .takes_value(true) - .value_name("CONTEXT") + .value_name("PURPOSE") .help( "Uses the key derivation mode, with the given\n\ - context string. Cannot be used with --keyed.", + purpose string. Cannot be used with --keyed.", ), ) .arg(Arg::with_name(NO_MMAP_ARG).long(NO_MMAP_ARG).help( @@ -129,8 +129,8 @@ impl Args { // In keyed mode, since stdin is used for the key, we can't handle // `-` arguments. Input::open handles that case below. blake3::Hasher::new_keyed(&read_key_from_stdin()?) - } else if let Some(context) = inner.value_of(DERIVE_KEY_ARG) { - blake3::Hasher::new_derive_key(context) + } else if let Some(purpose) = inner.value_of(DERIVE_KEY_ARG) { + blake3::Hasher::new_derive_key(purpose) } else { blake3::Hasher::new() }; |
