Skip to content

MergeSignaturesFile

Merges CAdES-based signatures into a single signed content.

1
$Crypto.MergeSignaturesFile(signatures: Array<string>, contentId: string, fileName: string, mimeType: string):FileInfo

Parameters

Array signatures
    An array of signature file IDs.

string contentId
    The file ID of the content. When null or empty, the resulting signature is detached.

string fileName
    The name of the resulting file.

string mimeType
    The MIME type of the resulting file.

Returns

The merged signature file information.

Examples

Combine the signatures of several signers into one file

1
2
3
4
5
6
var signatureIds = $Xml.SelectAll('Signers/Signer/SignatureFile').map(function (node) {
    return node.Evaluate('.');
});

var merged = $Crypto.MergeSignaturesFile(signatureIds, $Xml.Evaluate('Contract'), 'Contract.pdf.p7s', 'application/pkcs7-signature');
$Xml.SetValue('SignedContract', merged.Id);

See Also