29 lines
882 B
C++
29 lines
882 B
C++
#include <Void/Archive/Archive.hpp>
|
|
#include <Void/Binary/Reader.hpp>
|
|
#include <Void/Crypto/Crypto.hpp>
|
|
#include <Void/Plugin/Loader.hpp>
|
|
#include <Void/Plugin/Manager.hpp>
|
|
#include <Void/System/SignalWatcher.hpp>
|
|
#include <Void/Update/Update.hpp>
|
|
|
|
#include <array>
|
|
#include <bit>
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
int main()
|
|
{
|
|
const std::array bytes{std::byte{0x01}, std::byte{0x02}};
|
|
Void::Binary::Reader reader{bytes};
|
|
const auto value = reader.read<std::uint16_t>(std::endian::big);
|
|
const auto digest = Void::Crypto::sha256(bytes);
|
|
const Void::Archive::ExtractionOptions limits{};
|
|
const Void::Update::VerificationPolicy policy{};
|
|
const Void::Plugin::PluginManager::Options plugins{};
|
|
return value && *value == 0x0102 && digest && !digest->empty() &&
|
|
limits.maxEntries > 0 && policy.maxReleases > 0 &&
|
|
plugins.debounce_polls > 0
|
|
? 0
|
|
: 1;
|
|
}
|