Class AuditIntegrityVerifier
Verifies provider-neutral append-only audit integrity chains.
public static class AuditIntegrityVerifier
- Inheritance
-
AuditIntegrityVerifier
- Inherited Members
Methods
Verify(IEnumerable<AuditIntegrityLink>, string?, bool, string?, string?, long?)
Verifies that the supplied links form one continuous append-only chain in the supplied order.
public static AuditIntegrityVerificationResult Verify(IEnumerable<AuditIntegrityLink> links, string? expectedChainId = null, bool requireGenesis = true, string? expectedPreviousLinkHash = null, string? expectedTipLinkHash = null, long? expectedTipSequence = null)
Parameters
linksIEnumerable<AuditIntegrityLink>The links to verify, in chain order.
expectedChainIdstringThe chain identifier every link must carry. Defaults to the first link's chain identifier.
requireGenesisboolWhen true, the first link must be the genesis link at sequence 1.
expectedPreviousLinkHashstringThe link hash the first supplied link must point back to. Required when
requireGenesisis false and the first supplied link is not the genesis link, because a partial chain is anchored only by the hash of the link preceding it.expectedTipLinkHashstringWhen supplied, the final link's hash must equal this value, which detects a truncated chain.
expectedTipSequencelong?When supplied, the final link's sequence must equal this value, which detects a truncated chain.
Returns
Remarks
Link metadata is not part of the link hash, so metadata is not authenticated by chain verification and must not be relied on as tamper-evident.