From 98fe6179db3a2e770d5c52647153e60ed2d3c313 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 17 Jul 2024 06:06:06 +1000 Subject: [PATCH] Use "unfinalized" in header of Midstate The midstate has not been finalized [0], so use the term in the struct header. FTR I don't know _exactly_ what "finalized" means in the context of sha256 hashing (or hashing in general). This change came from a review suggestion and we have other mentions of "finalized" in the code. --- hashes/src/sha256.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashes/src/sha256.rs b/hashes/src/sha256.rs index a2a60758d..ccdce1ea4 100644 --- a/hashes/src/sha256.rs +++ b/hashes/src/sha256.rs @@ -149,7 +149,7 @@ impl Hash { pub const fn const_hash(bytes: &[u8]) -> Self { Hash(Midstate::const_hash(bytes, true).bytes) } } -/// Output of the SHA256 hash function. +/// Unfinalized output of the SHA256 hash function. /// /// The `Midstate` type is obscure and specialized and should not be used unless you are sure of /// what you are doing.