@@ -346,6 +346,8 @@ BOOST_CRYPT_GPU_ENABLED constexpr auto md5_hasher::md5_body() noexcept -> void
346
346
d0_ += d;
347
347
}
348
348
349
+ namespace detail {
350
+
349
351
template <typename T>
350
352
BOOST_CRYPT_GPU_ENABLED constexpr auto md5 (T begin, T end) noexcept -> boost::crypt::array<boost::crypt::uint8_t, 16>
351
353
{
@@ -355,7 +357,9 @@ BOOST_CRYPT_GPU_ENABLED constexpr auto md5(T begin, T end) noexcept -> boost::cr
355
357
}
356
358
else if (end == begin)
357
359
{
358
- return boost::crypt::array<boost::crypt::uint8_t , 16 >{0xd4 , 0x1d , 0x8c , 0xd9 , 0x8f , 0x00 , 0xb2 , 0x04 , 0xe9 , 0x80 , 0x09 , 0x98 , 0xec , 0xf8 , 0x42 , 0x7e };
360
+ return boost::crypt::array<boost::crypt::uint8_t , 16 > {
361
+ 0xd4 , 0x1d , 0x8c , 0xd9 , 0x8f , 0x00 , 0xb2 , 0x04 , 0xe9 , 0x80 , 0x09 , 0x98 , 0xec , 0xf8 , 0x42 , 0x7e
362
+ };
359
363
}
360
364
361
365
boost::crypt::md5_hasher hasher;
@@ -365,6 +369,8 @@ BOOST_CRYPT_GPU_ENABLED constexpr auto md5(T begin, T end) noexcept -> boost::cr
365
369
return result;
366
370
}
367
371
372
+ } // Namespace detail
373
+
368
374
BOOST_CRYPT_GPU_ENABLED constexpr auto md5 (const char * str) noexcept -> boost::crypt::array<boost::crypt::uint8_t, 16>
369
375
{
370
376
if (str == nullptr )
@@ -373,7 +379,7 @@ BOOST_CRYPT_GPU_ENABLED constexpr auto md5(const char* str) noexcept -> boost::c
373
379
}
374
380
375
381
const auto message_len {utility::strlen (str)};
376
- return md5 (str, str + message_len);
382
+ return detail:: md5 (str, str + message_len);
377
383
}
378
384
379
385
BOOST_CRYPT_GPU_ENABLED constexpr auto md5 (const char * str, boost::crypt::size_t len) noexcept -> boost::crypt::array<boost::crypt::uint8_t, 16>
@@ -383,20 +389,20 @@ BOOST_CRYPT_GPU_ENABLED constexpr auto md5(const char* str, boost::crypt::size_t
383
389
return boost::crypt::array<boost::crypt::uint8_t , 16 >{};
384
390
}
385
391
386
- return md5 (str, str + len);
392
+ return detail:: md5 (str, str + len);
387
393
}
388
394
389
395
// ----- String and String view aren't in the libcu++ STL so they so not have device markers -----
390
396
391
397
inline auto md5 (const std::string& str) noexcept -> boost::crypt::array<boost::crypt::uint8_t, 16>
392
398
{
393
- return md5 (str.begin (), str.end ());
399
+ return detail:: md5 (str.begin (), str.end ());
394
400
}
395
401
396
402
#ifdef BOOST_CRYPT_HAS_STRING_VIEW
397
403
inline auto md5 (const std::string_view& str) -> boost::crypt::array<boost::crypt::uint8_t, 16>
398
404
{
399
- return md5 (str.begin (), str.end ());
405
+ return detail:: md5 (str.begin (), str.end ());
400
406
}
401
407
#endif
402
408
0 commit comments