feat: adopt VoidLibrary VL-001..VL-013, self-building build.cpp, live logs, and generated CLI help
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 10s

This commit is contained in:
faumaray committed 2026-11-27 01:43:06 +03:00
1 parent ab64147f9d
commit 363fb8200e
33 files changed
+1754 -3155

No files matched your search

+6 -9
View File
@@ -1,5 +1,6 @@
#pragma once
#include <Void/Crypto/Crypto.hpp>
#include <Void/Functional/Error.hpp>
#include <Void/Functional/Result.hpp>
@@ -7,6 +8,7 @@
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <optional>
#include <span>
#include <string>
#include <string_view>
@@ -15,11 +17,10 @@ namespace Void::Build::Util {
using Sha256Digest = std::array<std::uint8_t, 32>;
// Streaming FIPS 180-4 SHA-256 hasher (VL-007: delegates to Void::Crypto when
// OpenSSL is available; provides zero-dependency built-in fallback otherwise).
// Streaming FIPS 180-4 SHA-256 hasher backed directly by Void::Crypto::Hasher (VL-007).
class Sha256Hasher {
public:
Sha256Hasher() noexcept;
Sha256Hasher();
void update(std::span<const std::byte> data) noexcept;
void update(std::span<const std::uint8_t> data) noexcept;
@@ -31,12 +32,8 @@ class Sha256Hasher {
[[nodiscard]] std::string finalize_hex() noexcept;
private:
void transform(const std::uint8_t block[64]) noexcept;
std::uint32_t state_[8];
std::uint64_t bit_count_{0};
std::uint8_t buffer_[64]{};
std::size_t buffer_len_{0};
std::optional<Void::Crypto::Hasher> hasher_;
Sha256Digest cached_digest_{};
bool finalized_{false};
};