CreaSign

Create an Enveloping Signature on Text

In an enveloping signature, the <ds:Signature> element contains signed or to-be-signed data as a child of a <ds:Object> element. To create an enveloping signature, follow these steps:

  1. Create a new CreaSignLite object.
  2. Call the CreateSignature method with SignatureFormat set to SignatureFormatEnvelopingText (1).
' 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"

Set resultData = csLite.CreateSignature(signingCert, "This text will be signed.", 1, "")

' Save the result to a file
saveTo="files\d1EnvelopingText.xml"
resultData.save saveTo

WScript.Echo "Result saved to: " & saveTo


Send comments on this topic.

(c) CREA 2002-2007 www.creasign.si