ComputeATSv3Imprint
function ComputeATSv3Imprint(const aCms: OctetString; aSignerIndex: Integer; aHashAlg: tHashAlgorithm; const aIndexDer: OctetString; const aContentDigest: OctetString; out aImprint: OctetString; out aError: string): Boolean;
ComputeATSv3Imprint returns H(M) where M is the nine-element concatenation of cl. 5.5.3. aIndexDer must be the EXACT octets emitted by BuildATSHashIndexV3 - it is element E9, so re-deriving it later instead of keeping it would silently change the imprint.
aContentDigest is element E2, the digest of the signed content under aHashAlg. Pass '' for an attached signature and it is computed from eContent; for a DETACHED signature it MUST be supplied (the external document's digest) and the call fails rather than contributing zeros.