updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
Scott E. Graves 2025-01-05 20:06:09 -06:00
parent e8240948b7
commit 85756ddd8c
2 changed files with 4 additions and 8 deletions

View File

@ -56,8 +56,8 @@ inline auto generate_key(
template <typename result_t, typename arr_t, std::size_t arr_size>
[[nodiscard]] inline auto decrypt_data(const std::array<arr_t, arr_size> &key,
const unsigned char *buffer,
std::size_t buffer_size, result_t &res)
-> bool {
std::size_t buffer_size,
result_t &res) -> bool {
if (buffer_size > encryption_header_size) {
const std::uint32_t size =
boost::endian::native_to_big(static_cast<std::uint32_t>(buffer_size));
@ -76,8 +76,8 @@ template <typename result_t, typename arr_t, std::size_t arr_size>
template <typename buffer_t, typename result_t, typename arr_t,
std::size_t arr_size>
[[nodiscard]] inline auto decrypt_data(const std::array<arr_t, arr_size> &key,
const buffer_t &buf, result_t &res)
-> bool {
const buffer_t &buf,
result_t &res) -> bool {
return decrypt_data<result_t>(
key, reinterpret_cast<const unsigned char *>(buf.data()), buf.size(),
res);
@ -185,7 +185,6 @@ encrypt_data(const std::array<unsigned char,
buf.size(), res);
}
#if defined(PROJECT_ENABLE_CURL)
using reader_func_t =
std::function<bool(data_buffer &cypher_text, std::uint64_t start_offset,
std::uint64_t end_offset)>;
@ -200,7 +199,6 @@ read_encrypted_range(const http_range &range,
const http_range &range, const utils::encryption::hash_256_t &key,
reader_func_t reader_func, std::uint64_t total_size, unsigned char *data,
std::size_t size, std::size_t &bytes_read) -> bool;
#endif // defined(PROJECT_ENABLE_CURL)
#endif // defined(PROJECT_ENABLE_BOOST)
template <typename hash_t>

View File

@ -60,7 +60,6 @@ auto decrypt_file_name(std::string_view encryption_token,
return utils::encryption::decrypt_data(encryption_token, buffer, file_name);
}
#if defined(PROJECT_ENABLE_CURL)
auto read_encrypted_range(const http_range &range,
const utils::encryption::hash_256_t &key,
reader_func_t reader_func, std::uint64_t total_size,
@ -158,7 +157,6 @@ auto read_encrypted_range(const http_range &range,
return true;
}
#endif // defined(PROJECT_ENABLE_CURL)
} // namespace repertory::utils::encryption
#endif // defined(PROJECT_ENABLE_LIBSODIUM) && defined (PROJECT_ENABLE_BOOST)