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");