feat(infrastructure): add PKCS#11 PDF signing infrastructure

This commit is contained in:
2026-10-22 02:26:13 +02:00
parent 3b4134e873
commit d9cd0d60e3
25 changed files with 2560 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
using DevExpress.Pdf;
using DocumentOperator.Application.Common.Enums;
namespace DocumentService.Infrastructure.Crypt.Helper;
public static class PdfCertificationLevelExtensions
{
public static PdfCertificationLevel ToDevExpress(this PdfSignatureCertificationLevel value) => value switch
{
PdfSignatureCertificationLevel.NoChangesAllowed => PdfCertificationLevel.NoChangesAllowed,
PdfSignatureCertificationLevel.FillForms => PdfCertificationLevel.FillForms,
PdfSignatureCertificationLevel.NoCertification => PdfCertificationLevel.NoCertification,
PdfSignatureCertificationLevel.FillFormsAndAnnotate => PdfCertificationLevel.FillFormsAndAnnotate,
_ => throw new ArgumentOutOfRangeException(nameof(value), value, null),
};
}