updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -101,27 +101,19 @@ struct kdf_config final {
|
||||
salt_t salt{};
|
||||
std::uint64_t checksum{};
|
||||
|
||||
[[nodiscard]] static constexpr auto size() -> std::size_t {
|
||||
return sizeof(kdf_config);
|
||||
}
|
||||
[[nodiscard]] static auto from_header(std::span<const unsigned char> data,
|
||||
kdf_config &cfg) -> bool;
|
||||
|
||||
[[nodiscard]] auto generate_checksum() const -> std::uint64_t;
|
||||
|
||||
void generate_salt();
|
||||
|
||||
[[nodiscard]] static auto from_header(std::span<const unsigned char> data,
|
||||
kdf_config &cfg) -> bool;
|
||||
|
||||
[[nodiscard]] auto to_header() -> auto {
|
||||
kdf_config tmp{*this};
|
||||
tmp.checksum = boost::endian::native_to_big(tmp.checksum);
|
||||
tmp.magic = boost::endian::native_to_big(tmp.magic);
|
||||
|
||||
std::array<std::uint8_t, size()> ret{};
|
||||
std::memcpy(ret.data(), &tmp, size());
|
||||
return ret;
|
||||
[[nodiscard]] static constexpr auto size() -> std::size_t {
|
||||
return sizeof(kdf_config);
|
||||
}
|
||||
|
||||
[[nodiscard]] auto to_header() const -> data_buffer;
|
||||
|
||||
[[nodiscard]] auto operator==(const kdf_config &) const -> bool = default;
|
||||
[[nodiscard]] auto operator!=(const kdf_config &) const -> bool = default;
|
||||
};
|
||||
|
Reference in New Issue
Block a user