Implement secure key via KDF for transparent data encryption/decryption #60

This commit is contained in:
2025-08-30 14:10:06 -05:00
parent 5a033e7f12
commit 55b7afc023
2 changed files with 18 additions and 17 deletions

View File

@@ -546,14 +546,13 @@ auto encrypting_reader::reader_function(char *buffer, size_t size,
size_t nitems) -> size_t {
REPERTORY_USES_FUNCTION_NAME();
std::span<char> dest(buffer, size);
auto read_size =
static_cast<std::uint64_t>(size) * static_cast<std::uint64_t>(nitems);
if (read_size == 0U) {
return 0U;
}
std::span<char> dest(buffer, read_size);
auto read_offset{read_offset_};
std::size_t total_read{};
auto total_size{total_size_};