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)
51
51
52
52
namespace boost ::crypt::detail {
53
53
54
+ /*
54
55
using memset_span_t = void(*)(std::span<std::byte>);
55
56
56
57
inline 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)
90
91
runtime_memset_func(data);
91
92
}
92
93
}
94
+ */
93
95
94
96
using generic_meset_t = void (*)(void *, size_t );
95
97
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ void test_class()
125
125
126
126
for (const auto & test_value : test_values)
127
127
{
128
+ hasher.init ();
128
129
const auto msg {std::get<0 >(test_value)};
129
130
hasher.process_bytes (msg);
130
131
const auto message_result {hasher.get_digest ()};
@@ -140,9 +141,11 @@ void test_class()
140
141
// LCOV_EXCL_STOP
141
142
}
142
143
}
143
-
144
- hasher.init ();
145
144
}
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{});
146
149
}
147
150
148
151
void 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