From f8cd8a6f7144db8a22925699eeaa4192d0087857 Mon Sep 17 00:00:00 2001 From: 52 69 63 68 61 72 64 Date: Tue, 17 Dec 2024 21:22:11 +0100 Subject: [PATCH] Fix typo in digest.rs --- src/digest.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/digest.rs b/src/digest.rs index 92565d1dd..9919871b1 100644 --- a/src/digest.rs +++ b/src/digest.rs @@ -84,7 +84,7 @@ impl BlockContext { .completed_bytes .checked_add(polyfill::u64_from_usize(num_pending)) .ok_or_else(|| FinishError::too_much_input(self.completed_bytes))?; - let copmleted_bits = BitLength::from_byte_len(completed_bytes) + let completed_bits = BitLength::from_byte_len(completed_bytes) .map_err(|_: error::Unspecified| FinishError::too_much_input(self.completed_bytes))?; let block_len = self.algorithm.block_len(); @@ -120,7 +120,7 @@ impl BlockContext { let (to_zero, len) = padding.split_at_mut(padding.len() - 8); to_zero.fill(0); - len.copy_from_slice(&copmleted_bits.to_be_bytes()); + len.copy_from_slice(&completed_bits.to_be_bytes()); let (completed_bytes, leftover) = self.block_data_order(block, cpu_features); debug_assert_eq!((completed_bytes, leftover.len()), (block_len, 0));