Skip to content

Commit a7549cb

Browse files
committed
Fix HMAC DRBG compatibility with NVCC
1 parent d91d010 commit a7549cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/boost/crypt/utility/config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
// ----- Has something -----
128128

129129
// ----- Unreachable -----
130-
#if defined(__GNUC__) || defined(__clang__)
130+
#if defined(__GNUC__) || defined(__clang__) || defined(BOOST_CRYPT_HAS_CUDA)
131131
# define BOOST_CRYPT_UNREACHABLE __builtin_unreachable()
132132
#elif defined(_MSC_VER)
133133
# define BOOST_CRYPT_UNREACHABLE __assume(0)

include/boost/crypt2/drbg/detail/hmac_drbg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ BOOST_CRYPT_GPU_ENABLED_CONSTEXPR auto hmac_drbg<HMACType, max_hasher_security,
135135
const auto provided_data_size {provided_data_1.size() + provided_data_2.size() + provided_data_3.size()};
136136

137137
// Step 1: V || 0x00 || provided data
138-
compat::array<compat::byte, 1U> storage_gap {std::byte{0x00}};
138+
compat::array<compat::byte, 1U> storage_gap {compat::byte{0x00}};
139139
compat::span<const compat::byte, 1U> storage_gap_span {storage_gap};
140140

141141
HMACType hmac;

0 commit comments

Comments
 (0)