From 0bd41e56355cc47c92c91ff6acfcdbf759fc56ae Mon Sep 17 00:00:00 2001 From: sergey-shandar Date: Thu, 18 Jul 2024 01:52:27 -0700 Subject: [PATCH] 6B --- blockset-lib/src/sha2/hash_state.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/blockset-lib/src/sha2/hash_state.rs b/blockset-lib/src/sha2/hash_state.rs index 553f825f..a23f32a0 100644 --- a/blockset-lib/src/sha2/hash_state.rs +++ b/blockset-lib/src/sha2/hash_state.rs @@ -379,5 +379,27 @@ mod tests { 0x87c074c_bd39fe6f7_0f6cdee1_652a0b5c ]) ); + // "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEFabcdefghijk" + // af2bd64ee47c437502fee60861488b70de1fb8a7f614c0c496974e2308703058 + assert_eq!( + f( + SHA256, + [ + [ + 0x43444546_38394142_34353637_30313233, + 0x43444546_38394142_34353637_30313233 + ], + [ + 0x43444546_38394142_34353637_30313233, + 0x696A6B00_65666768_61626364 + ] + ], + 472 + ), + u256x::swap32([ + 0xde1fb8a_7f614c0c4_96974e23_08703058, + 0xaf2bd64_ee47c4375_02fee608_61488b70 + ]) + ); } }