SecureBlackbox 2020 Java Edition

Questions / Feedback?

XMLReference Type

Represents an XML reference element.

Remarks

XMLReference specifies the digest algorithm and digest value, and, optionally: an identifier of the object being signed, the type of the object, and/or a list of transforms to be applied prior to digesting.

Fields

AutoGenerateElementId
boolean

Specifies whether the identifier (ID) attribute for a referenced (target) element should be auto-generated during signing. Used when the referenced element doesn't have an ID and CustomElementId and URI properties are empty.

CanonicalizationMethod
int

Use this property to specify the canonicalization method for the transform of the reference. Use cxcmNone value to not to include canonicalization transform in transform chain. See XML-Signature Syntax and Processing specification for details.

cxcmNone0
cxcmCanon1
cxcmCanonComment2
cxcmExclCanon3
cxcmExclCanonComment4
cxcmMinCanon5
cxcmCanon_v1_16
cxcmCanonComment_v1_17

CustomElementId
String

Specifies a custom identifier (ID) attribute for a referenced (target) element that will be set on signing. Used when the referenced element doesn't have an ID and URI property is empty.

DigestValue
byte[]

Use this property to get or set the value of the digest calculated over the referenced data.

This field is optional and should be set only if you don't provide the actual data via TargetData or URI. If the data is set, then you don't need to set DigestValue since it will be calculated automatically.

HashAlgorithm
String

Specifies the hash algorithm to be used.

Supported values:

SB_HASH_ALGORITHM_MD5MD5
SB_HASH_ALGORITHM_SHA1SHA1
SB_HASH_ALGORITHM_SHA224SHA224
SB_HASH_ALGORITHM_SHA256SHA256
SB_HASH_ALGORITHM_SHA384SHA384
SB_HASH_ALGORITHM_SHA512SHA512
SB_HASH_ALGORITHM_RIPEMD160RIPEMD160
SB_HASH_ALGORITHM_GOST_R3411_1994GOST1994
SB_HASH_ALGORITHM_WHIRLPOOLWHIRLPOOL
SB_HASH_ALGORITHM_SHA3_256SHA3_256
SB_HASH_ALGORITHM_SHA3_384SHA3_384
SB_HASH_ALGORITHM_SHA3_512SHA3_512

HasURI
boolean

Specifies whether the URI is set (even when it is empty).

ID
String

A user-defined identifier (ID) attribute of this Reference element.

InclusiveNamespacesPrefixList
String

Use this property to specify InclusiveNamespaces PrefixList for exclusive canonicalization transform of the reference. See XML-Signature Syntax and Processing specification for details.

ReferenceType
String

The Reference's type attribute as defined in XMLDSIG specification.

TargetData
byte[]

Contains the referenced external data when the digest value is not explicitly specified.

This field is optional and should only be set if you reference the external data via URI, and you don't provide the digest value explicitly via DigestValue.

TargetXMLElement
String

This property specifies the referenced XML element. Used when the URI property is not set. In this case, the URI value is generated based on the ID of the referenced (target) XML element. If the URI property is set, this property is ignored until the ResolveReference event.

Supported values are:

""an empty string indicates the Document element.
"#id"indicates an XML element with specified Id.
XPointer expressionindicates an XML element selected using XPointer expression. Use the XPathNamespaces property to specify Prefixes and NamespaceURIs
For example:
"/root/data[1]" - indicates the second "data" element under the document element with a name "root"
"//ns1:data" - indicates a data element. "ns1" prefix should be defined in XPathNamespaces property
Node nameindicates an XML element selected using its NodeName.
For example: "data" - indicates an XML element with node name "data".

URI
String

Use this property to get or set the URL which references the data. If the data is external, the application must set either TargetData or DigestValue. If TargetData is set, the digest is calculated automatically unless it is explicitly set by the application via DigestValue.

UseBase64Transform
boolean

Specifies whether Base64 transform is included in transform chain.

UseEnvelopedSignatureTransform
boolean

Specifies whether enveloped signature transform is included in transform chain.

UseXPathFilter2Transform
boolean

Specifies whether XPath Filter 2.0 transform is included in transform chain.

UseXPathTransform
boolean

Specifies whether XPath transform is included in transform chain.

XPathExpression
String

Use this property to specify XPath expression for XPath transform of the reference.

XPathFilter2Expressions
String

Use this property to specify XPointer expression(s) for XPath Filter 2.0 transform of the reference.

TBD

XPathFilter2Filters
String

Use this property to specify XPointer filter(s) for XPath Filter 2.0 transform of the reference. The prefix list is comma-separated.

Supported values:

"intersect"Intersect filter computes the intersection of the selected subtrees with the filter node-set.
"subtract"Subtract filter computes the subtraction of the selected subtrees with the filter node-set.
"union"Union filter computes the union of the selected subtrees with the filter node-set.

XPathFilter2PrefixList
String

Use this property to specify a prefix list for XPath Filter 2.0 transform of the reference. The prefix list is space-separated. Namespace URIs that are used are taken from XPathNamespaces property.

XPathPrefixList
String

Use this property to specify a prefix list for XPath transform of the reference. The prefix list is space-separated. Namespace URIs that are used are taken from XPathNamespaces property.

Constructors

public XMLReference();

Creates a new XML reference element.

public XMLReference(String ID);

Creates a new XML reference element from its ID .

public XMLReference(String ID, String URI);

Creates a new XML reference element from its ID and URI reference to the external data.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 Java Edition - Version 20.0 [Build 8156]