aboutsummaryrefslogtreecommitdiff
path: root/b3sum/tests
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2021-02-28 19:46:33 -0500
committerJack O'Connor <[email protected]>2021-02-28 20:05:40 -0500
commit320affafc11132d92f5274ae82dde37f3db3ef58 (patch)
tree8eea2f53418f66781fa67cd652b25d019d0f237c /b3sum/tests
parent71d67e081028972790d4b56e23dc57805aa78a85 (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/tests')
-rw-r--r--b3sum/tests/cli_tests.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/b3sum/tests/cli_tests.rs b/b3sum/tests/cli_tests.rs
index 7ecf8b9..2e9e4d9 100644
--- a/b3sum/tests/cli_tests.rs
+++ b/b3sum/tests/cli_tests.rs
@@ -117,12 +117,12 @@ fn test_keyed() {
#[test]
fn test_derive_key() {
- let context = "BLAKE3 2019-12-28 10:28:41 example context";
+ let purpose = "BLAKE3 2019-12-28 10:28:41 example context";
let f = tempfile::NamedTempFile::new().unwrap();
f.as_file().write_all(b"key material").unwrap();
f.as_file().flush().unwrap();
- let expected = hex::encode(blake3::derive_key(context, b"key material"));
- let output = cmd!(b3sum_exe(), "--derive-key", context, "--no-names", f.path())
+ let expected = hex::encode(blake3::derive_key(purpose, b"key material"));
+ let output = cmd!(b3sum_exe(), "--derive-key", purpose, "--no-names", f.path())
.read()
.unwrap();
assert_eq!(&*expected, &*output);