CreaSign

CreaSignLite.CreateSignatureMethod

Creates a signature on the specified data.

[VisualBasic]
PublicFunctionCreateSignature( _
ByVal CertNameAsString,_
ByVal DataAsObject,_
ByVal SignatureFormatAsSignatureFormat,_
ByVal XPathAsObject_
)AsData

Parameters

CertName
The digital certificate, the private key of which is used to compute the signature. See also "Specifying the Signing Certificate".
Data
The data that should be signed. See the remarks section for supported formats.
SignatureFormat
The format of the signature as specified in the SignatureFormat.
XPath
The XPath expression pointing to the XML node that should be signed. Required only when the SignatureFormat is SignatureFormatDetached.

Return Value

Signed data.

Remarks

The following types of data are supported:

Source type XML signature PKCS#7 signature
A string A new XML document is created from a string and signed.

When the SignatureFormat is SignatureFormatEnvelopingText the data is treated as text. Otherwise, the data is treated as an XML document.

Not supported.
An XML element A new XML document is created from the element (IXMLDomElement) that holds the data and then signed. Not supported.
A byte array A new XML document is created from a single dimensional array of bytes and then signed. The data is loaded from a byte array and then signed.
A Data object A new XML document is created from the data stored in a Data object and then signed. The data is loaded from the Data object and then signed.
A custom object that implements the IStream interface A new XML document is created from the data stored in a custom object and verified. Some of the objects that implement the IStream interface: ASP Request object, ASP Response object, ADO stream. The data is loaded from the Data object and then signed.

This method can not be called from an untrusted code.

Requirements

Requires CreaSign Pro or CreaSign Lite.

See Also

CreaSignLite Class | CreaSign Namespace


Send comments on this topic.

(c) Crea 2002-2006