How to calculate the checksum in an XFA form
Asked Answered
A

0

10

When you save an XFA form (XFA = XML Forms Architecture) using Adobe software, a checksum attribute is added to the form element. This checksum appears to be a SHA-1 digest, but it's unclear as to what is actually fed to the hash. Does anyone have any idea as to how this is generated? This value is needed by Adobe Acrobat to validate what's actually in the form's XML data, but when I create a hash of the XML that is being fed to the form, Adobe Acrobat doesn't accept it. This checksum attribute isn't documented in the XFA specification, so I would really appreciate it, if somebody could:

  1. Confirm that the value is actually a hash created using the SHA-1 hashing algorithm?
  2. Explain which data should be used to create this hash.
Alienee answered 14/12, 2014 at 14:46 Comment(4)
Bruno, do you have any news on that issue? Or is it still in the hands of Adobe? Foxit, for example, is able to create this hash...Kosaka
@Setasign I don't have any answer yet. Foxit must have reverse engineered it...Alienee
@BrunoLowagie I am working on populate data into "form" - xfa.org/schema/xfa-form/2.8. But it doesn't affect any. So, without checksum, we cannot do it?Heartily
It seems like iText once had an implementation of this, but I can't find it in the more recent versions of their software: api.itextpdf.com/pdfXFA/java/2.0.2/index.html?com/itextpdf/tool/…Flyleaf

© 2022 - 2024 — McMap. All rights reserved.