aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2020-08-14 11:30:46 -0400
committerJack O'Connor <[email protected]>2020-08-14 11:30:46 -0400
commit88094169fcfa0256a64e0159377cc03875be0dd4 (patch)
tree52142025b44380fe4e90e9998087bf0c4987f79e /README.md
parent7589c8c608850f8780a3572f23ef1f016a7148f6 (diff)
tweak the readme hex example
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 2 insertions, 4 deletions
diff --git a/README.md b/README.md
index 3ab72f1..4963efa 100644
--- a/README.md
+++ b/README.md
@@ -131,10 +131,8 @@ let mut output_reader = hasher.finalize_xof();
output_reader.fill(&mut output);
assert_eq!(&output[..32], hash1.as_bytes());
-// Extract hash as hex str
-let hash1_hex = &hash1.to_hex()[..];
-assert_eq!("c09afee0c9f361fb61e5ff28a7739893de766fb470c5fa82b4e5e31de27fbad4", hash1_hex);
-
+// Print a hash as hex.
+println!("{}", hash1.to_hex());
```
Besides `hash`, BLAKE3 provides two other modes, `keyed_hash` and