@@ -86,7 +86,9 @@ void Os::Test::FileTest::Tester::shadow_crc(U32& crc) {
8686 // Calculate CRC on full file starting at m_pointer
8787 for (FwSizeType i = data.m_pointer ; i < data.m_data .size ();
8888 i++, this ->m_shadow .seek (1 , Os::File::SeekType::RELATIVE)) {
89- crc = update_crc_32 (crc, static_cast <char >(data.m_data .at (i)));
89+ // FIXME: Use Utils::Hash wrapper instead of directly using CRC-32 implementation
90+ U8 byte = data.m_data .at (i);
91+ crc = Utils::crc32_ieee802_3_update (&byte, sizeof (byte), crc);
9092 }
9193 // Update tracking variables
9294 this ->m_independent_crc = Os::File::INITIAL_CRC;
@@ -100,7 +102,9 @@ void Os::Test::FileTest::Tester::shadow_partial_crc(FwSizeType& size) {
100102 std::min (static_cast <FwSizeType>(data.m_pointer ) + size, static_cast <FwSizeType>(data.m_data .size ()));
101103 size = (data.m_pointer >= bound) ? 0 : static_cast <FwSizeType>(bound - data.m_pointer );
102104 for (FwSizeType i = data.m_pointer ; i < bound; i++) {
103- this ->m_independent_crc = update_crc_32 (this ->m_independent_crc , static_cast <char >(data.m_data .at (i)));
105+ // FIXME: Use Utils::Hash wrapper instead of directly using CRC-32 implementation
106+ U8 byte = data.m_data .at (i);
107+ this ->m_independent_crc = Utils::crc32_ieee802_3_update (&byte, sizeof (byte), this ->m_independent_crc );
104108 this ->m_shadow .seek (1 , Os::File::SeekType::RELATIVE);
105109 }
106110}
0 commit comments