I’ve just started getting an exception when saving a signature.
This is the exception:
class com.aspose.pdf.internal.ms.System.Security.Cryptography.z22: Invalid MAC - file may have been tampered! —> class com.aspose.pdf.internal.p885.z10: Invalid MAC - file may have been tampered!
Here’s a snippet of the code I’m using
// Create PdfFileSignature instance
PdfFileSignature pdfSignSingle = new PdfFileSignature();
// Bind the source PDF by reading contents of Stream
pdfSignSingle.bindPdf(new ByteArrayInputStream(((ByteArrayOutputStream) out).toByteArray()));
// Sign the PDF file using PKCS1 object
pdfSignSingle.sign(1,signReason, signContact, signLocation, true, new Rectangle(36, 748, 144, 780), cert);
// Save final output
pdfSignSingle.save(destination);
Any insights greatly appreciated!