CreaSign

Objects.Add Method 

Adds a new object to the list of objects stored in the <ds:Signature> node.

[Visual Basic]
Public Function Add( _
   ByVal Id As String, _
   ByVal MimeType As String, _
   ByVal Encoding As String, _
   ByVal Data As Object _
) As Object

Parameters

Id
An identifier, which is used to identify the <ds:Object> node. This allows the node to be referenced from another location.
MimeType
The mime type of the data that is being added to the object. See the Remarks section.
Encoding
The encoding of the data that is being added to the object. See the Remarks section.
Data
The data that should be added to the object.

Return Value

The newly added object.

Remarks

To sign the object, you have to add reference to it. The following types of source data are supported.
EncodingMimeTypeDescription
base64(any value)The data is base64 encoded. The following types of data are supported: a byte array, a Data object or a custom object that implements the IStream interface.
(not specified)text/xml or any other XML mime typeThe data should be an XML document or node. The following types of data are supported: a Data object, an IXmlDomElement, a string, a byte array or a custom object that implements the IStream interface.
(not specified)text/plainThe type of data should be a string.
(not specified)(not specified)See the table below.

 

When MimeType and Encoding are not specified, data is handled as shown in the next table.

Source data typeDescription
A string The data is handled as a plain text.
An XML elementThe data is handled as an XML (IXMLDomElement).
A byte arrayThe data is handled as a stream of bytes. It is base64 encoded before it is added to the XML.
A Data objectThe data is handled as a Data object.
A custom object that implements the IStream interfaceThe data is handled as a custom object.

Some of the objects that implement the IStream  interface:  ASP Request object, ASP Response object, ADO stream. 

Requirements

Requires CreaSign Pro (not supported by CreaSign Lite).

See Also

Objects Class | CreaSign Namespace | XmlSignature.AddObject


Send comments on this topic.

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