Table of Contents

Interface IIntegrityVerifier

Namespace
SimpleSign.PAdES.Validation
Assembly
SimpleSign.PAdES.dll

Verifies document integrity: ByteRange validation and hash comparison.

public interface IIntegrityVerifier

Methods

ValidateByteRangeAsync(Stream, PdfSignatureField, CmsSignedData, List<string>, List<string>, CancellationToken, ILogger?, bool)

Validates ByteRange structure and verifies document hash matches the CMS messageDigest.

Task<bool> ValidateByteRangeAsync(Stream pdfStream, PdfSignatureField field, CmsSignedData cmsData, List<string> errors, List<string> warnings, CancellationToken cancellationToken, ILogger? logger = null, bool isLastSignature = true)

Parameters

pdfStream Stream
field PdfSignatureField
cmsData CmsSignedData
errors List<string>
warnings List<string>
cancellationToken CancellationToken
logger ILogger
isLastSignature bool

Returns

Task<bool>

ValidateTimestampByteRangeAsync(Stream, PdfSignatureField, string, byte[], List<string>, List<string>, bool, CancellationToken, ILogger?)

Validates ByteRange for a document-level timestamp.

Task<bool> ValidateTimestampByteRangeAsync(Stream pdfStream, PdfSignatureField field, string tstHashAlgOid, byte[] expectedHash, List<string> errors, List<string> warnings, bool isLastSignature, CancellationToken cancellationToken, ILogger? logger = null)

Parameters

pdfStream Stream
field PdfSignatureField
tstHashAlgOid string
expectedHash byte[]
errors List<string>
warnings List<string>
isLastSignature bool
cancellationToken CancellationToken
logger ILogger

Returns

Task<bool>