Class S57ExchangeSetVerifier
- Namespace
- EncDotNet.S57.ExchangeSets
- Assembly
- EncDotNet.S57.dll
Default implementation of IS57ExchangeSetVerifier.
public sealed class S57ExchangeSetVerifier : IS57ExchangeSetVerifier
- Inheritance
-
S57ExchangeSetVerifier
- Implements
- Inherited Members
Remarks
Validates each catalogue entry's CRC checksum (CATD CRCS subfield) against the
corresponding file on disk using the CRC-32 algorithm described by EncDotNet.S57.ExchangeSets.S57Crc32.
S-63 digital-signature verification is delegated to an optional IS63SignatureVerifier. When none is supplied (the default), every file is reported as NotSigned, which matches unencrypted ENC exchange sets.
Constructors
S57ExchangeSetVerifier(IS63SignatureVerifier?)
Initializes a new instance of the S57ExchangeSetVerifier class.
public S57ExchangeSetVerifier(IS63SignatureVerifier? signatureVerifier = null)
Parameters
signatureVerifierIS63SignatureVerifierAn optional S-63 signature verifier. When null, signature verification is skipped and all files report NotSigned.
Methods
VerifyAsync(string, S57Catalog, S63TrustAnchorOptions?, ILogger?, CancellationToken)
Verifies the integrity metadata in catalog against the files located
under rootPath.
public Task<S57ExchangeSetVerificationResult> VerifyAsync(string rootPath, S57Catalog catalog, S63TrustAnchorOptions? trustAnchors = null, ILogger? logger = null, CancellationToken cancellationToken = default)
Parameters
rootPathstringThe absolute path to the root directory of the exchange set.
catalogS57CatalogThe parsed
CATALOG.031whose entries to verify.trustAnchorsS63TrustAnchorOptionsOptional S-63 trust anchor options. Currently unused because signature verification is a seam; supply when S-63 support is available.
loggerILoggerAn optional logger for reporting verification warnings.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<S57ExchangeSetVerificationResult>
A result enumerating per-file verification outcomes without throwing.