We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Get hash of a digital signature file

we need to send digital signature hash to signing authority to get the hash signed.

we are using aspose.pdf to sign the documents. need to know how to get the hash of signed file and how to put signed hash to digital signature.

Code

string _dataDir = @“C:\Temp”;
Aspose.Pdf.Facades.PdfFileSignature pdfSign = new Aspose.Pdf.Facades.PdfFileSignature();
pdfSign.BindPdf(_dataDir + “test.pdf”);

            // Create a rectangle for signature location
            System.Drawing.Rectangle rect = new System.Drawing.Rectangle(10, 10, 300, 50);
            pdfSign.SignatureAppearance = _dataDir + "gb.png";
            // Set signature appearance


            // Create any of the three signature types
            PKCS1 signature = new PKCS1(_dataDir + "gb.pfx", "gaurav"); // PKCS#1

            
            pdfSign.Sign(1, "Verification", "Gaurav.Bhatnagar@test.com", "test", true, rect, signature);

        
            // Save output PDF file
            pdfSign.Save(_dataDir + "DigitallySign.pdf");

@gauravb

We need to further investigate this requirement and for the sake, an investigation ticket as PDFNET-53393 has been logged in our issue tracking system. We will further look into its details and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.