![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Verifies hash chain integrity. More...
#include <audit_chain.hpp>
Classes | |
| struct | VerificationResult |
| Result of a full chain verification. More... | |
Static Public Member Functions | |
| static VerificationResult | verify (const uint8_t *chain_data, size_t chain_size) |
| Verify a chain from serialized bytes. | |
| static VerificationResult | verify (const std::vector< HashChainEntry > &entries) |
| Verify a vector of HashChainEntry objects. | |
| static bool | verify_continuity (const std::array< uint8_t, 32 > &file1_last_hash, const std::vector< HashChainEntry > &file2_entries) |
| Check that two chain segments link together across files. | |
| static bool | verify_entry (const HashChainEntry &entry, const std::array< uint8_t, 32 > &expected_prev_hash) |
| Verify a single entry against an expected prev_hash. | |
Verifies hash chain integrity.
Provides static methods for verifying:
All methods are pure functions with no side effects.
Definition at line 531 of file audit_chain.hpp.
|
inlinestatic |
Verify a vector of HashChainEntry objects.
Checks performed for each entry:
| entries | The chain entries to verify, in order. |
Definition at line 618 of file audit_chain.hpp.
|
inlinestatic |
Verify a chain from serialized bytes.
Deserializes the chain and then performs full verification. The input format must match AuditChainWriter::serialize_chain().
| chain_data | Pointer to the serialized chain bytes. |
| chain_size | Size of the serialized chain in bytes. |
Definition at line 559 of file audit_chain.hpp.
|
inlinestatic |
Check that two chain segments link together across files.
Verifies that the last entry_hash of one file matches the first prev_hash of the next file. This enables multi-file audit trails where each Parquet file contains a segment of the chain.
| file1_last_hash | entry_hash of the last entry in the prior file. |
| file2_entries | Entries from the subsequent file. |
Definition at line 698 of file audit_chain.hpp.
|
inlinestatic |
Verify a single entry against an expected prev_hash.
Checks that:
expected_prev_hash Use this for streaming verification where you process entries one at a time without buffering the entire chain.
| entry | The entry to verify. |
| expected_prev_hash | The entry_hash of the preceding entry. |
Definition at line 721 of file audit_chain.hpp.