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 /c/main.c | |
| 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 'c/main.c')
| -rw-r--r-- | c/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -73,7 +73,7 @@ enum cpu_feature get_cpu_features(); int main(int argc, char **argv) { size_t out_len = BLAKE3_OUT_LEN; uint8_t key[BLAKE3_KEY_LEN]; - char *context = ""; + char *purpose = ""; uint8_t mode = HASH_MODE; while (argc > 1) { if (argc <= 2) { @@ -98,7 +98,7 @@ int main(int argc, char **argv) { } } else if (strcmp("--derive-key", argv[1]) == 0) { mode = DERIVE_KEY_MODE; - context = argv[2]; + purpose = argv[2]; } else { fprintf(stderr, "Unknown flag.\n"); return 1; @@ -139,7 +139,7 @@ int main(int argc, char **argv) { blake3_hasher_init_keyed(&hasher, key); break; case DERIVE_KEY_MODE: - blake3_hasher_init_derive_key(&hasher, context); + blake3_hasher_init_derive_key(&hasher, purpose); break; default: abort(); |
