1 parent
8583a479dd
commit
3851aeb703
42 files changed
+6948
-759
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#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;
|
||||
}
|
||||
Reference in new issue
Block a user