PdfRpt.Core.Security.EncryptionWorker.ApplySignature C# (CSharp) Méthode

ApplySignature() public méthode

Applies a digital signature to a document
public ApplySignature ( Stream pdfStreamOutput ) : void
pdfStreamOutput Stream
Résultat void
        public void ApplySignature(Stream pdfStreamOutput)
        {
            if (DocumentSecurity == null) return;
            if (DocumentSecurity.DigitalSignature == null) return;
            if (DocumentSecurity.EncryptionPreferences == null) return;

            // close the document without closing the underlying stream
            PdfWriter.CloseStream = false;
            PdfDoc.Close();
            pdfStreamOutput.Position = 0;

            signPasswordEncryption(pdfStreamOutput);
            signPublicKeyEncryption(pdfStreamOutput);
        }