feat(infrastructure): add PKCS#11 PDF signing infrastructure
This commit is contained in:
@@ -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),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user