Tests: Fix Hmac state comparison function for testing to compare the different states correctly.
@@ -237,11 +237,11 @@ mod public {
// One function tested per submodule.
- /// Compare two Sha512 state objects to check if their fields
+ /// Compare two HMAC state objects to check if their fields
/// are the same.
fn compare_hmac_states(state_1: &Hmac, state_2: &Hmac) {
- compare_sha512_states(&state_1.opad_hasher, &state_1.opad_hasher);
- compare_sha512_states(&state_1.ipad_hasher, &state_1.ipad_hasher);
+ compare_sha512_states(&state_1.opad_hasher, &state_2.opad_hasher);
+ compare_sha512_states(&state_1.ipad_hasher, &state_2.ipad_hasher);
assert_eq!(state_1.ipad[..], state_2.ipad[..]);
assert_eq!(state_1.is_finalized, state_2.is_finalized);
