In an enveloped signature, the signed or to-be-signed data is an XML document and contains the <ds:Signature> element as its child element. To create an enveloped signature, follow these steps:
' Create CreaSign Lite Set csLite=CreateObject("CreaSignClientIE.CreaSignLite") 'With CreaSign Lite use: CreaSignLite.CreaSignLite ' The following certificate will be used for signing signingCert="CERT_FIND_SUBJECT_STR=CREA_TESTUSER_1" ' Load a sample xml from file set doc=CreateObject("CreaSignClientIE.Data") doc.load "files\d1.xml" Set resultData = csLite.CreateSignature(signingCert, doc, 2,"") ' Save the result to a file saveTo="files\d1Enveloped.xml" resultData.save saveTo WScript.Echo "Result saved to: " & saveTo
(c) Crea 2002-2006