Table of Contents

Class AuditVerifier

Namespace
Pamoja.Audit
Assembly
Pamoja.Audit.dll

Checks a chain one record at a time, in the order they were written.

public sealed class AuditVerifier : IDisposable
Inheritance
AuditVerifier
Implements
Inherited Members

Constructors

AuditVerifier(ReadOnlySpan<byte>)

Creates a verifier for a chain signed by one public key.

public AuditVerifier(ReadOnlySpan<byte> publicKey)

Parameters

publicKey ReadOnlySpan<byte>

The 32-byte key the records were signed with.

Exceptions

PamojaException

The key is not a valid public key.

Methods

Check(AuditEntry)

Checks the next record, in the order the records were written.

public bool Check(AuditEntry entry)

Parameters

entry AuditEntry

The next record to check.

Returns

bool

true when the record belongs where it was offered.

Remarks

Feeding records out of order, skipping one, or repeating one is refused just as an altered payload is.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()