File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
include/boost/crypt2/detail Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ BOOST_CRYPT_GPU_ENABLED void clear_mem(T& arr)
5151
5252namespace boost ::crypt::detail {
5353
54+ /*
5455using memset_span_t = void(*)(std::span<std::byte>);
5556
5657inline constexpr memset_span_t default_memset = [](std::span<std::byte> s) constexpr
@@ -90,6 +91,7 @@ constexpr void clear_mem(std::span<std::byte> data)
9091 runtime_memset_func(data);
9192 }
9293}
94+ */
9395
9496using generic_meset_t = void (*)(void *, size_t );
9597
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ void test_class()
125125
126126 for (const auto & test_value : test_values)
127127 {
128+ hasher.init ();
128129 const auto msg {std::get<0 >(test_value)};
129130 hasher.process_bytes (msg);
130131 const auto message_result {hasher.get_digest ()};
@@ -140,9 +141,11 @@ void test_class()
140141 // LCOV_EXCL_STOP
141142 }
142143 }
143-
144- hasher.init ();
145144 }
145+
146+ const std::string bad_update_msg {" bad" };
147+ BOOST_TEST (hasher.process_bytes (bad_update_msg) == boost::crypt::state::state_error);
148+ BOOST_TEST (hasher.get_digest () == boost::crypt::sha1_hasher::return_type{});
146149}
147150
148151void test_file (const std::string& filename, const std::array<std::uint16_t , 20 >& res)
You can’t perform that action at this time.
0 commit comments