diff --git a/include/boost/crypt2/hash/detail/sha_1_2_hasher_base.hpp b/include/boost/crypt2/hash/detail/sha_1_2_hasher_base.hpp index ba5891a3..33284df7 100644 --- a/include/boost/crypt2/hash/detail/sha_1_2_hasher_base.hpp +++ b/include/boost/crypt2/hash/detail/sha_1_2_hasher_base.hpp @@ -128,16 +128,29 @@ auto sha_1_2_hasher_base::get_digest(Range& { using value_type = range_value_t; - auto data_span {span(forward(data))}; + #ifndef BOOST_CRYPT_HAS_CUDA + auto data_span {std::span(std::forward(data))}; + #else + auto data_span {cuda::std::span(cuda::std::forward(data))}; + #endif if (data_span.size() * sizeof(value_type) < digest_size) { return; } + #if defined(__clang__) && __clang_major__ >= 19 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-container" + #endif + get_digest_impl(span( as_writable_bytes(data_span).data(), digest_size )); + + #if defined(__clang__) && __clang_major__ >= 19 + #pragma clang diagnostic pop + #endif } template