# Transforms Engine

**API Group:** `xmlsec_core_transforms`

Transforms engine — chaining, execution, and built-in transforms.

[XSLT transform](https://www.w3.org/TR/xmldsig-core1/#sec-XSLT) implementation.

XPath transform implementation.

XMLDsig and XMLEnc transforms.

Relationship transform implementation.

Key wrap helper functions (AES/DES/Camellia).

[Enveloped signature transform](https://www.w3.org/TR/xmldsig-core1/#sec-EnvelopedSignature) implementation.

C14N canonicalization transform implementation.

The [Transforms Element](http://www.w3.org/TR/xmldsig-core/#sec-Transforms) contains an ordered list of Transform elements; these describe how the signer obtained the data object that was digested. Schema Definition: 

```c
<elementname="Transforms"type="ds:TransformsType"/>
<complexTypename="TransformsType">
<sequence>
<elementref="ds:Transform"maxOccurs="unbounded"/>
</sequence>
</complexType>
<elementname="Transform"type="ds:TransformType"/>
<complexTypename="TransformType"mixed="true">
<choiceminOccurs="0"maxOccurs="unbounded">
<anynamespace="##other"processContents="lax"/>
<!--(1,1)elementsfrom(0,unbounded)namespaces-->
<elementname="XPath"type="string"/>
</choice>
<attributename="Algorithm"type="anyURI"use="required"/>
</complexType>
``` DTD: 

```c
<!ELEMENTTransforms(Transform+)>
<!ELEMENTTransform(#PCDATA|XPath%Transform.ANY;)*>
<!ATTLISTTransformAlgorithmCDATA#REQUIRED>
<!ELEMENTXPath(#PCDATA)>
```

## Macros

### `xmlSecTransformUriTypeNone`

*Defined as:* `0x0000`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L99)

The URI type is unknown or not set.

---

### `xmlSecTransformUriTypeEmpty`

*Defined as:* `0x0001`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L104)

The empty URI ("") type.

---

### `xmlSecTransformUriTypeSameDocument`

*Defined as:* `0x0002`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L110)

The same-document ("#...") non-empty URI type.

The same document ("#...") but not empty ("") URI type.

---

### `xmlSecTransformUriTypeLocal`

*Defined as:* `0x0004`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L115)

The local URI ("file:///....") type.

---

### `xmlSecTransformUriTypeRemote`

*Defined as:* `0x0008`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L120)

The remote URI type.

---

### `xmlSecTransformUriTypeAny`

*Defined as:* `0xFFFF`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L125)

Any URI type.

---

### `xmlSecTransformDataTypeUnknown`

*Defined as:* `0x0000`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L143)

The transform data type is unknown.

The transform data type is unknown or nor data expected.

---

### `xmlSecTransformDataTypeBin`

*Defined as:* `0x0001`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L148)

The binary transform data.

---

### `xmlSecTransformDataTypeXml`

*Defined as:* `0x0002`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L153)

The xml transform data.

---

### `xmlSecTransformUsageUnknown`

*Defined as:* `0x0000`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L168)

Transforms usage is unknown or undefined.

---

### `xmlSecTransformUsageDSigTransform`

*Defined as:* `0x0001`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L174)

Transform usable in dsig:Transform.

Transform could be used in <dsig:Transform/>.

---

### `xmlSecTransformUsageC14NMethod`

*Defined as:* `0x0002`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L180)

Transform usable in dsig:CanonicalizationMethod.

Transform could be used in <dsig:CanonicalizationMethod/>.

---

### `xmlSecTransformUsageDigestMethod`

*Defined as:* `0x0004`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L186)

Transform usable in dsig:DigestMethod.

Transform could be used in <dsig:DigestMethod/>.

---

### `xmlSecTransformUsageSignatureMethod`

*Defined as:* `0x0008`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L192)

Transform usable in dsig:SignatureMethod.

Transform could be used in <dsig:SignatureMethod/>.

---

### `xmlSecTransformUsageEncryptionMethod`

*Defined as:* `0x0010`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L198)

Transform usable in enc:EncryptionMethod.

Transform could be used in <enc:EncryptionMethod/>.

---

### `xmlSecTransformUsageKeyDerivationMethod`

*Defined as:* `0x0020`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L204)

Transform usable in enc11:KeyDerivationMethod.

Transform could be used in <enc11:KeyDerivationMethod/>.

---

### `xmlSecTransformUsageAgreementMethod`

*Defined as:* `0x0040`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L210)

Transform usable in enc11:AgreementMethod.

Transform could be used in <enc11:AgreementMethod/>.

---

### `xmlSecTransformUsageAny`

*Defined as:* `0xFFFF`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L215)

Transform could be used for operation.

---

### `XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK`

*Defined as:* `0x00000001`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L240)

Resolve URI ID references without XPointers (Visa3D hack).

If this flag is set then URI ID references are resolved directly without using XPointers. This allows one to sign/verify Visa3D documents that don't follow XML, XPointer and XML DSig specifications.

---

### `XMLSEC_TRANSFORMCTX_FLAGS_SUPPORT_ASN1_SIGNATURE_VALUES`

*Defined as:* `0x00000002`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L247)

Support ASN1 encoded ECDSA signature values.

If this flag is set then ASN1 encoded ECDSA signature values will be used (see [https://github.com/lsh123/xmlsec/issues/995](https://github.com/lsh123/xmlsec/issues/995)).

---

### `XMLSEC_TRANSFORM_FLAGS_USER_SPECIFIED`

*Defined as:* `0x00000001`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L329)

Transform was specified in the XML file.

If this flag is set then this transform was specified in the XML file (vs a transform added by the XMLSec library).

---

### `xmlSecTransformGetName`

*Defined as:* `((xmlSecTransformIsValid((transform))) ? \
          xmlSecTransformKlassGetName((transform)->id) : NULL)`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L417)

Macro. Returns transform name.

**Parameters:**

- `transform` — the pointer to transform.

---

### `xmlSecTransformIsValid`

*Defined as:* `((( transform ) != NULL) && \
         (( transform )->id != NULL) && \
         (( transform )->id->klassSize >= sizeof(xmlSecTransformKlass)) && \
         (( transform )->id->objSize >= sizeof(xmlSecTransform)) && \
         (( transform )->id->name != NULL))`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L426)

Macro. Returns 1 if `transform` is valid.

Macro. Returns 1 if the `transform` is valid or 0 otherwise. 

**Parameters:**

- `transform` — the pointer to transform.

---

### `xmlSecTransformCheckId`

*Defined as:* `(xmlSecTransformIsValid(( transform )) && \
        ((((const xmlSecTransformId) (( transform )->id))) == ( i )))`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L440)

Macro. Returns 1 if `transform` has id `i`.

Macro. Returns 1 if the `transform` is valid and has specified id `i` or 0 otherwise. 

**Parameters:**

- `transform` — the pointer to transform.
- `i` — the transform id.

---

### `xmlSecTransformCheckSize`

*Defined as:* `(xmlSecTransformIsValid(( transform )) && \
        ((( transform )->id->objSize) >= ( size )))`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L451)

Macro. Returns 1 if `transform` has at least `size` bytes.

Macro. Returns 1 if the `transform` is valid and has at least `size` bytes or 0 otherwise. 

**Parameters:**

- `transform` — the pointer to transform.
- `size` — the transform object size.

---

### `xmlSecTransformKlassGetName`

*Defined as:* `(((klass)) ? ((klass)->name) : NULL)`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L703)

Macro. Returns transform klass name.

**Parameters:**

- `klass` — the transform's klass.

---

### `xmlSecTransformIdListId`

*Defined as:* `xmlSecTransformIdListGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L714)

Transform klasses list klass.

---

### `xmlSecTransformIdUnknown`

*Defined as:* `((xmlSecTransformId)NULL)`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L738)

The "unknown" transform id (NULL).

---

### `xmlSecTransformBase64Id`

*Defined as:* `xmlSecTransformBase64GetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L743)

The base64 encode transform klass.

---

### `xmlSecTransformInclC14NId`

*Defined as:* `xmlSecTransformInclC14NGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L752)

The inclusive C14N without comments transform klass.

The regular (inclusive) C14N without comments transform klass.

---

### `xmlSecTransformInclC14NWithCommentsId`

*Defined as:* `xmlSecTransformInclC14NWithCommentsGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L760)

The inclusive C14N with comments transform klass.

The regular (inclusive) C14N with comments transform klass.

---

### `xmlSecTransformInclC14N11Id`

*Defined as:* `xmlSecTransformInclC14N11GetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L768)

The inclusive C14N 1.1 without comments transform klass.

The regular (inclusive) C14N 1.1 without comments transform klass.

---

### `xmlSecTransformInclC14N11WithCommentsId`

*Defined as:* `xmlSecTransformInclC14N11WithCommentsGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L776)

The inclusive C14N 1.1 with comments transform klass.

The regular (inclusive) C14N 1.1 with comments transform klass.

---

### `xmlSecTransformExclC14NId`

*Defined as:* `xmlSecTransformExclC14NGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L784)

The exclusive C14N without comments transform.

The exclusive C14N without comments transform klass.

---

### `xmlSecTransformExclC14NWithCommentsId`

*Defined as:* `xmlSecTransformExclC14NWithCommentsGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L791)

The exclusive C14N with comments transform klass.

---

### `xmlSecTransformEnvelopedId`

*Defined as:* `xmlSecTransformEnvelopedGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L798)

The "enveloped" transform klass.

---

### `xmlSecTransformXPathId`

*Defined as:* `xmlSecTransformXPathGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L805)

The XPath transform klass.

---

### `xmlSecTransformXPath2Id`

*Defined as:* `xmlSecTransformXPath2GetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L812)

The XPath2 transform klass.

---

### `xmlSecTransformXPointerId`

*Defined as:* `xmlSecTransformXPointerGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L819)

The XPointer transform klass.

---

### `xmlSecTransformRelationshipId`

*Defined as:* `xmlSecTransformRelationshipGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L829)

The Relationship transform klass.

---

### `xmlSecTransformXsltId`

*Defined as:* `xmlSecTransformXsltGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L838)

The XSLT transform klass.

---

### `xmlSecTransformRemoveXmlTagsC14NId`

*Defined as:* `xmlSecTransformRemoveXmlTagsC14NGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L848)

The 'remove all xml tags' transform klass.

The "remove all xml tags" transform klass (used before base64 transforms).

---

### `xmlSecTransformVisa3DHackId`

*Defined as:* `xmlSecTransformVisa3DHackGetKlass()`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L859)

Selects node subtree by node id string (Visa3D hack).

Selects node subtree by given node id string. The only reason why we need this is Visa3D protocol. It doesn't follow XML/XPointer/XMLDSig specs and allows invalid XPointer expressions in the URI attribute. Since we couldn't evaluate such expressions thru XPath/XPointer engine, we need to have this hack here.

---

## Typedefs

### `xmlSecTransformKlass`

```c
typedef const struct _xmlSecTransformKlass xmlSecTransformKlass;
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L34)

The transform klass.

---

### `xmlSecTransformId`

```c
typedef const struct _xmlSecTransformKlass* xmlSecTransformId;
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L38)

Pointer to `xmlSecTransformKlass`.

---

### `xmlSecTransformUriType`

```c
typedef unsigned int xmlSecTransformUriType;
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L94)

URI transform type bit mask.

---

### `xmlSecTransformDataType`

```c
typedef xmlSecByte xmlSecTransformDataType;
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L137)

Transform data type bit mask.

---

### `xmlSecTransformUsage`

```c
typedef unsigned int xmlSecTransformUsage;
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L163)

The transform usage bit mask.

---

### `xmlSecTransformCtxPreExecuteCallback`

```c
typedef int(* xmlSecTransformCtxPreExecuteCallback) (xmlSecTransformCtxPtr transformCtx))(xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L232)

Callback called before data processing to verify/modify transforms.

The callback called after creating transforms chain but before starting data processing. Application can use this callback to do additional transforms chain verification or modification and aborting transforms execution (if necessary). 

**Parameters:**

- `transformCtx` — the pointer to transform's context.


**Returns:** 0 on success and a negative value otherwise (in this case, transforms chain will not be executed and xmlsec processing stops).

---

### `xmlSecTransformInitializeMethod`

```c
typedef int(* xmlSecTransformInitializeMethod) (xmlSecTransformPtr transform))(xmlSecTransformPtr transform);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L511)

The transform specific initialization method.

**Parameters:**

- `transform` — the pointer to transform object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformFinalizeMethod`

```c
typedef void(* xmlSecTransformFinalizeMethod) (xmlSecTransformPtr transform))(xmlSecTransformPtr transform);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L517)

The transform specific destroy method.

**Parameters:**

- `transform` — the pointer to transform object.

---

### `xmlSecTransformGetDataTypeMethod`

```c
typedef xmlSecTransformDataType(* xmlSecTransformGetDataTypeMethod) (xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L528)

The transform specific method to query data type in a mode.

The transform specific method to query information about transform data type in specified mode `mode`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `mode` — the mode.
- `transformCtx` — the pointer to transform context object.


**Returns:** transform data type.

---

### `xmlSecTransformNodeReadMethod`

```c
typedef int(* xmlSecTransformNodeReadMethod) (xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L541)

The transform specific method to read data from XML node.

The transform specific method to read the transform data from the `node`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `node` — the pointer to <dsig:Transform/> node.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformNodeWriteMethod`

```c
typedef int(* xmlSecTransformNodeWriteMethod) (xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L553)

The transform specific method to write transform info to XML.

The transform specific method to write transform information to an XML node `node`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `node` — the pointer to <dsig:Transform/> node.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformSetKeyRequirementsMethod`

```c
typedef int(* xmlSecTransformSetKeyRequirementsMethod) (xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq))(xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L564)

Transform specific method to set key requirements.

Transform specific method to set transform's key requirements. 

**Parameters:**

- `transform` — the pointer to transform object.
- `keyReq` — the pointer to key requirements structure.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformSetKeyMethod`

```c
typedef int(* xmlSecTransformSetKeyMethod) (xmlSecTransformPtr transform, xmlSecKeyPtr key))(xmlSecTransformPtr transform, xmlSecKeyPtr key);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L574)

The transform specific method to set the key.

The transform specific method to set the key for use. 

**Parameters:**

- `transform` — the pointer to transform object.
- `key` — the pointer to key.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformVerifyMethod`

```c
typedef int(* xmlSecTransformVerifyMethod) (xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L589)

The transform specific method to verify processing results.

The transform specific method to verify transform processing results (used by digest and signature transforms). This method sets `status` member of the xmlSecTransform structure to either `xmlSecTransformStatusOk` if verification succeeded or `xmlSecTransformStatusFail` otherwise. 

**Parameters:**

- `transform` — the pointer to transform object.
- `data` — the input buffer.
- `dataSize` — the size of input buffer `data`.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformPushBinMethod`

```c
typedef int(* xmlSecTransformPushBinMethod) (xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L605)

The transform specific method to push binary data down the chain.

The transform specific method to process data from `data` and push result to the next transform in the chain. 

**Parameters:**

- `transform` — the pointer to transform object.
- `data` — the input binary data,
- `dataSize` — the input data size.
- `final` — the flag: if set to 1 then it's the last data chunk.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformPopBinMethod`

```c
typedef int(* xmlSecTransformPopBinMethod) (xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L622)

The transform specific method to pop binary data from the chain.

The transform specific method to pop data from previous transform in the chain and return result in the `data` buffer. The size of returned data is placed in the `dataSize`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `data` — the buffer to store result data.
- `maxDataSize` — the size of the buffer `data`.
- `dataSize` — the pointer to returned data size.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformPushXmlMethod`

```c
typedef int(* xmlSecTransformPushXmlMethod) (xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L636)

The transform specific method to push XML nodes down the chain.

The transform specific method to process `nodes` and push result to the next transform in the chain. 

**Parameters:**

- `transform` — the pointer to transform object.
- `nodes` — the input nodes.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformPopXmlMethod`

```c
typedef int(* xmlSecTransformPopXmlMethod) (xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L648)

The transform specific method to pop XML nodes from the chain.

The transform specific method to pop data from previous transform in the chain, process the data and return result in `nodes`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `nodes` — the pointer to store popinter to result nodes.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformExecuteMethod`

```c
typedef int(* xmlSecTransformExecuteMethod) (xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L659)

Transform specific data processing method.

Transform specific method to process a chunk of data. 

**Parameters:**

- `transform` — the pointer to transform object.
- `last` — the flag: if set to 1 then it's the last data chunk.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value otherwise.

---

## Enumerations

### `xmlSecTransformStatus`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L56)

The transform execution status.

| Value | Initializer | Description |
|-------|-------------|-------------|
| `xmlSecTransformStatusNone` | `= 0` |  |
| `xmlSecTransformStatusWorking` | `` |  |
| `xmlSecTransformStatusFinished` | `` |  |
| `xmlSecTransformStatusOk` | `` |  |
| `xmlSecTransformStatusFail` | `` |  |

---

### `xmlSecTransformMode`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L67)

The transform operation mode.

| Value | Initializer | Description |
|-------|-------------|-------------|
| `xmlSecTransformModeNone` | `= 0` |  |
| `xmlSecTransformModePush` | `` |  |
| `xmlSecTransformModePop` | `` |  |

---

### `xmlSecTransformOperation`

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L76)

The transform operation.

| Value | Initializer | Description |
|-------|-------------|-------------|
| `xmlSecTransformOperationNone` | `= 0` |  |
| `xmlSecTransformOperationEncode` | `` |  |
| `xmlSecTransformOperationDecode` | `` |  |
| `xmlSecTransformOperationSign` | `` |  |
| `xmlSecTransformOperationVerify` | `` |  |
| `xmlSecTransformOperationEncrypt` | `` |  |
| `xmlSecTransformOperationDecrypt` | `` |  |

---

## Functions

### `xmlSecTransformIdsGet`

```c
xmlSecPtrListPtr xmlSecTransformIdsGet(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L45)

Gets global registered transform klasses list.

**Returns:** the pointer to list of all registered transform klasses.

---

### `xmlSecTransformIdsInit`

```c
int xmlSecTransformIdsInit(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L46)

Initializes the transform klasses.

Initializes the transform klasses. This function is called from the `xmlSecInit` function and the application should not call it directly.

**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformIdsShutdown`

```c
void xmlSecTransformIdsShutdown(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L47)

Shuts down the transform klasses.

Shuts down the keys data klasses. This function is called from the `xmlSecShutdown` function and the application should not call it directly.

---

### `xmlSecTransformIdsRegisterDefault`

```c
int xmlSecTransformIdsRegisterDefault(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L48)

Registers default XML Security Library transform klasses.

Registers default (implemented by XML Security Library) transform klasses: XPath transform, Base64 transform, ...

**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformIdsRegister`

```c
int xmlSecTransformIdsRegister(xmlSecTransformId id);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L49)

Registers a transform klass in the global list.

Registers `id` in the global list of transform klasses. 

**Parameters:**

- `id` — the transform klass.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformUriTypeCheck`

```c
int xmlSecTransformUriTypeCheck(xmlSecTransformUriType type, const xmlChar *uri);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L127)

Checks if `uri` matches expected type `type`.

**Parameters:**

- `type` — the expected URI type.
- `uri` — the uri for checking.


**Returns:** 1 if `uri` matches `type`, 0 if not or a negative value if an error occurs.

---

### `xmlSecTransformCtxCreate`

```c
xmlSecTransformCtxPtr xmlSecTransformCtxCreate(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L279)

Creates a transforms chain processing context.

Creates transforms chain processing context. The caller is responsible for destroying returned object by calling `xmlSecTransformCtxDestroy` function.

**Returns:** pointer to newly allocated context object or NULL if an error occurs.

---

### `xmlSecTransformCtxDestroy`

```c
void xmlSecTransformCtxDestroy(xmlSecTransformCtxPtr ctx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L280)

Destroys a transforms chain processing context.

Destroy context object created with `xmlSecTransformCtxCreate` function. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.

---

### `xmlSecTransformCtxInitialize`

```c
int xmlSecTransformCtxInitialize(xmlSecTransformCtxPtr ctx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L281)

Initializes a transforms chain processing context.

Initializes transforms chain processing context. The caller is responsible for cleaning up returned object by calling `xmlSecTransformCtxFinalize` function. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformCtxFinalize`

```c
void xmlSecTransformCtxFinalize(xmlSecTransformCtxPtr ctx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L282)

Cleans up a transforms chain processing context.

Cleans up `ctx` object initialized with `xmlSecTransformCtxInitialize` function. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.

---

### `xmlSecTransformCtxReset`

```c
void xmlSecTransformCtxReset(xmlSecTransformCtxPtr ctx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L283)

Resets transforms context for new processing.

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.

---

### `xmlSecTransformCtxCopyUserPref`

```c
int xmlSecTransformCtxCopyUserPref(xmlSecTransformCtxPtr dst, xmlSecTransformCtxPtr src);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L284)

Copies user settings from `src` context to `dst`.

Copies user settings from `src` context to `dst`. 

**Parameters:**

- `dst` — the pointer to destination transforms chain processing context.
- `src` — the pointer to source transforms chain processing context.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxSetUri`

```c
int xmlSecTransformCtxSetUri(xmlSecTransformCtxPtr ctx, const xmlChar *uri, xmlNodePtr hereNode);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L286)

Parses URI and adds xpointer transforms if required.

Parses uri and adds xpointer transforms if required.

The following examples demonstrate what the URI attribute identifies and how it is dereferenced ([http://www.w3.org/TR/xmldsig-core/#sec-ReferenceProcessingModel](http://www.w3.org/TR/xmldsig-core/#sec-ReferenceProcessingModel)):

- `URI="http://example.com/bar.xml"` identifies the octets that represent the external resource ``, that is probably an XML document given its file extension.
- `URI="http://example.com/bar.xml#chapter1"` identifies the element with ID attribute value 'chapter1' of the external XML resource ``, provided as an octet stream. Again, for the sake of interoperability, the element identified as 'chapter1' should be obtained using an XPath transform rather than a URI fragment (barename XPointer resolution in external resources is not REQUIRED in this specification).
- `URI=""` identifies the node-set (minus any comment nodes) of the XML resource containing the signature
- `URI="#chapter1"` identifies a node-set containing the element with ID attribute value 'chapter1' of the XML resource containing the signature. XML Signature (and its applications) modify this node-set to include the element plus all descendants including namespaces and attributes – but not comments.

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `uri` — the URI.
- `hereNode` — the pointer to "here" node required by some XML transforms (may be NULL).


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxAppend`

```c
int xmlSecTransformCtxAppend(xmlSecTransformCtxPtr ctx, xmlSecTransformPtr transform);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L289)

Connects a transform to the end of the chain in `ctx`.

Connects the `transform` to the end of the chain of transforms in the `ctx` (see `xmlSecTransformConnect` function for details). 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `transform` — the pointer to new transform.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxPrepend`

```c
int xmlSecTransformCtxPrepend(xmlSecTransformCtxPtr ctx, xmlSecTransformPtr transform);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L291)

Connects a transform to the beginning of the chain in `ctx`.

Connects the `transform` to the beggining of the chain of transforms in the `ctx` (see `xmlSecTransformConnect` function for details). 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `transform` — the pointer to new transform.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxCreateAndAppend`

```c
xmlSecTransformPtr xmlSecTransformCtxCreateAndAppend(xmlSecTransformCtxPtr ctx, xmlSecTransformId id);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L293)

Creates a transform and appends it to the chain in `ctx`.

Creates new transform and connects it to the end of the chain of transforms in the `ctx` (see `xmlSecTransformConnect` function for details). 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `id` — the new transform klass.


**Returns:** pointer to newly created transform or NULL if an error occurs.

---

### `xmlSecTransformCtxCreateAndPrepend`

```c
xmlSecTransformPtr xmlSecTransformCtxCreateAndPrepend(xmlSecTransformCtxPtr ctx, xmlSecTransformId id);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L295)

Creates a transform and prepends it to the chain in `ctx`.

Creates new transform and connects it to the end of the chain of transforms in the `ctx` (see `xmlSecTransformConnect` function for details). 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `id` — the new transform klass.


**Returns:** pointer to newly created transform or NULL if an error occurs.

---

### `xmlSecTransformCtxNodeRead`

```c
xmlSecTransformPtr xmlSecTransformCtxNodeRead(xmlSecTransformCtxPtr ctx, xmlNodePtr node, xmlSecTransformUsage usage);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L297)

Reads a transform from a node and appends it to the chain.

Reads the transform from the `node` and appends it to the current chain of transforms in `ctx`. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `node` — the pointer to transform's node.
- `usage` — the transform's usage (signature, encryption, etc.).


**Returns:** pointer to newly created transform or NULL if an error occurs.

---

### `xmlSecTransformCtxNodesListRead`

```c
int xmlSecTransformCtxNodesListRead(xmlSecTransformCtxPtr ctx, xmlNodePtr node, xmlSecTransformUsage usage);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L300)

Reads transforms from <dsig:Transform/> children and appends to chain.

Reads transforms from the <dsig:Transform/> children of the `node` and appends them to the current transforms chain in `ctx` object. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `node` — the pointer to <dsig:Transform/> nodes parent node.
- `usage` — the transform's usage (signature, encryption, etc.).


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxPrepare`

```c
int xmlSecTransformCtxPrepare(xmlSecTransformCtxPtr ctx, xmlSecTransformDataType inputDataType);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L303)

Prepares the transform context for processing data.

Prepares the transform context for processing data of `inputDataType`. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `inputDataType` — the expected input type.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxBinaryExecute`

```c
int xmlSecTransformCtxBinaryExecute(xmlSecTransformCtxPtr ctx, const xmlSecByte *data, xmlSecSize dataSize);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L305)

Processes binary data using transforms chain in `ctx`.

Processes binary data using transforms chain in the `ctx`. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `data` — the input binary data buffer.
- `dataSize` — the input data size.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxUriExecute`

```c
int xmlSecTransformCtxUriExecute(xmlSecTransformCtxPtr ctx, const xmlChar *uri);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L308)

Processes binary data from URI using transforms chain in `ctx`.

Process binary data from the URI using transforms chain in `ctx`. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `uri` — the URI.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxXmlExecute`

```c
int xmlSecTransformCtxXmlExecute(xmlSecTransformCtxPtr ctx, xmlSecNodeSetPtr nodes);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L310)

Processes nodes using transforms chain in `ctx`.

Process `nodes` using transforms in the transforms chain in `ctx`. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `nodes` — the input node set.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxExecute`

```c
int xmlSecTransformCtxExecute(xmlSecTransformCtxPtr ctx, xmlDocPtr doc);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L312)

Executes transforms chain in `ctx`.

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `doc` — the pointer to input document.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformCtxDebugDump`

```c
void xmlSecTransformCtxDebugDump(xmlSecTransformCtxPtr ctx, FILE *output);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L314)

Prints transforms context debug information to `output`.

Prints transforms context debug information to `output`. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `output` — the pointer to output FILE.

---

### `xmlSecTransformCtxDebugXmlDump`

```c
void xmlSecTransformCtxDebugXmlDump(xmlSecTransformCtxPtr ctx, FILE *output);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L316)

Prints transforms context debug information to `output` in XML format.

Prints transforms context debug information to `output` in XML format. 

**Parameters:**

- `ctx` — the pointer to transforms chain processing context.
- `output` — the pointer to output FILE.

---

### `xmlSecTransformCtxGetDefaultBinaryChunkSize`

```c
xmlSecSize xmlSecTransformCtxGetDefaultBinaryChunkSize(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L320)

Gets the default binary chunk size.

Gets the binary chunk size. Increasing the chunk size improves XMLSec library performance at the expense of increased memory usage.

**Returns:** the current binary processing chunk size.

---

### `xmlSecTransformCtxSetDefaultBinaryChunkSize`

```c
void xmlSecTransformCtxSetDefaultBinaryChunkSize(xmlSecSize binaryChunkSize);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L321)

Sets the default binary chunk size.

Sets the default binary chunk size. Increasing the chunk size improves XMLSec library performance at the expense of increased memory usage. This function is not thread safe and should only be called during initialization. 

**Parameters:**

- `binaryChunkSize` — the new binary chunk size (must be greater than zero).

---

### `xmlSecTransformCreate`

```c
xmlSecTransformPtr xmlSecTransformCreate(xmlSecTransformId id);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L368)

Creates a new transform of the specified klass.

Creates new transform of the `id` klass. The caller is responsible for destroying returned transform using `xmlSecTransformDestroy` function. 

**Parameters:**

- `id` — the transform id to create.


**Returns:** pointer to newly created transform or NULL if an error occurs.

---

### `xmlSecTransformDestroy`

```c
void xmlSecTransformDestroy(xmlSecTransformPtr transform);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L369)

Destroys a transform object.

Destroys transform created with `xmlSecTransformCreate` function. 

**Parameters:**

- `transform` — the pointer to transform.

---

### `xmlSecTransformNodeRead`

```c
xmlSecTransformPtr xmlSecTransformNodeRead(xmlNodePtr node, xmlSecTransformUsage usage, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L370)

Reads a transform from a node.

Reads transform from the `node` as follows:

1) reads "Algorithm" attribute;

2) checks the lists of known and allowed transforms;

3) calls transform's create method;

4) calls transform's read transform node method. 

**Parameters:**

- `node` — the pointer to the transform's node.
- `usage` — the transform usage (signature, encryption, ...).
- `transformCtx` — the transform's chain processing context.


**Returns:** pointer to newly created transform or NULL if an error occurs.

---

### `xmlSecTransformPump`

```c
int xmlSecTransformPump(xmlSecTransformPtr left, xmlSecTransformPtr right, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L373)

Pops data from left transform and pushes to right transform.

Pops data from `left` transform and pushes to `right` transform until no more data is available. 

**Parameters:**

- `left` — the source pumping transform.
- `right` — the destination pumping transform.
- `transformCtx` — the transform's chain processing context.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformSetKey`

```c
int xmlSecTransformSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L376)

Sets the transform's key.

**Parameters:**

- `transform` — the pointer to transform.
- `key` — the pointer to key.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformSetKeyReq`

```c
int xmlSecTransformSetKeyReq(xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L378)

Sets the key requirements for `transform` in `keyReq`.

Sets the key requirements for `transform` in the `keyReq`. 

**Parameters:**

- `transform` — the pointer to transform.
- `keyReq` — the pointer to keys requirements object.


**Returns:** 0 on success or a negative value otherwise.

---

### `xmlSecTransformVerify`

```c
int xmlSecTransformVerify(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L380)

Verifies data against the transform's processing results.

Verifies the data with transform's processing results (for digest, HMAC and signature transforms). The verification result is stored in the `status` member of xmlSecTransform object. 

**Parameters:**

- `transform` — the pointer to transform.
- `data` — the binary data for verification.
- `dataSize` — the data size.
- `transformCtx` — the transform's chain processing context.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformVerifyNodeContent`

```c
int xmlSecTransformVerifyNodeContent(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L384)

Verifies binary results from base64-decoded node content.

Gets the `node` content, base64 decodes it and calls `xmlSecTransformVerify` function to verify binary results. 

**Parameters:**

- `transform` — the pointer to transform.
- `node` — the pointer to node.
- `transformCtx` — the transform's chain processing context.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformGetDataType`

```c
xmlSecTransformDataType xmlSecTransformGetDataType(xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L387)

Gets transform input or output data type (binary or XML).

Gets transform input (`mode` is "push") or output (`mode` is "pop") data type (binary or XML). 

**Parameters:**

- `transform` — the pointer to transform.
- `mode` — the data mode (push or pop).
- `transformCtx` — the transform's chain processing context.


**Returns:** the transform's data type for the `mode` operation.

---

### `xmlSecTransformPushBin`

```c
int xmlSecTransformPushBin(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L390)

Processes binary data and pushes results to next transform.

Process binary `data` and pushes results to next transform. 

**Parameters:**

- `transform` — the pointer to transform object.
- `data` — the input binary data,
- `dataSize` — the input data size.
- `final` — the flag: if set to 1 then it's the last data chunk.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformPopBin`

```c
int xmlSecTransformPopBin(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L395)

Pops data from previous transform, processes it, and returns result.

Pops data from previous transform in the chain, processes data and returns result in the `data` buffer. The size of returned data is placed in the `dataSize`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `data` — the buffer to store result data.
- `maxDataSize` — the size of the buffer `data`.
- `dataSize` — the pointer to returned data size.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformPushXml`

```c
int xmlSecTransformPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L400)

Processes nodes and pushes result to the next transform.

Processes `nodes` and pushes result to the next transform in the chain. 

**Parameters:**

- `transform` — the pointer to transform object.
- `nodes` — the input nodes.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformPopXml`

```c
int xmlSecTransformPopXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L403)

Pops data from previous transform, processes it, and returns nodes.

Pops data from previous transform in the chain, processes the data and returns result in `nodes`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `nodes` — the pointer to store popinter to result nodes.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformExecute`

```c
int xmlSecTransformExecute(xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L406)

Executes a transform (used by default push/pop methods).

Executes transform (used by default popBin/pushBin/popXml/pushXml methods). 

**Parameters:**

- `transform` — the pointer to transform.
- `last` — the flag: if set to 1 then it's the last data chunk.
- `transformCtx` — the transform's chain processing context.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformDebugDump`

```c
void xmlSecTransformDebugDump(xmlSecTransformPtr transform, FILE *output);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L409)

Prints transform's debug information to `output`.

**Parameters:**

- `transform` — the pointer to transform.
- `output` — the pointer to output FILE.

---

### `xmlSecTransformDebugXmlDump`

```c
void xmlSecTransformDebugXmlDump(xmlSecTransformPtr transform, FILE *output);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L411)

Prints transform's debug information to `output` in XML format.

Prints transform's debug information to `output` in XML format. 

**Parameters:**

- `transform` — the pointer to transform.
- `output` — the pointer to output FILE.

---

### `xmlSecTransformConnect`

```c
int xmlSecTransformConnect(xmlSecTransformPtr left, xmlSecTransformPtr right, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L461)

Connects two transforms in the chain, inserting a conversion if needed.

If the data object is a node-set and the next transform requires octets, the signature application MUST attempt to convert the node-set to an octet stream using Canonical XML [XML-C14N].

The story is different if the right transform is base64 decode ([http://www.w3.org/TR/xmldsig-core/#sec-Base-64](http://www.w3.org/TR/xmldsig-core/#sec-Base-64)):

This transform requires an octet stream for input. If an XPath node-set (or sufficiently functional alternative) is given as input, then it is converted to an octet stream by performing operations logically equivalent to 1) applying an XPath transform with expression self::text(), then 2) taking the string-value of the node-set. Thus, if an XML element is identified by a barename XPointer in the Reference URI, and its content consists solely of base64 encoded character data, then this transform automatically strips away the start and end tags of the identified element and any of its descendant elements as well as any descendant comments and processing instructions. The output of this transform is an octet stream. 

**Parameters:**

- `left` — the pointer to left (prev) transform.
- `right` — the pointer to right (next) transform.
- `transformCtx` — the transform's chain processing context.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformRemove`

```c
void xmlSecTransformRemove(xmlSecTransformPtr transform);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L464)

Removes `transform` from the chain.

**Parameters:**

- `transform` — the pointer to xmlSecTransform structure.

---

### `xmlSecTransformDefaultGetDataType`

```c
xmlSecTransformDataType xmlSecTransformDefaultGetDataType(xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L471)

Gets transform data type by analyzing available push/pop methods.

Gets transform input (`mode` is "push") or output (`mode` is "pop") data type (binary or XML) by analyzing available pushBin/popBin/pushXml/popXml methods. 

**Parameters:**

- `transform` — the pointer to transform.
- `mode` — the data mode (push or pop).
- `transformCtx` — the transform's chain processing context.


**Returns:** the transform's data type for the `mode` operation.

---

### `xmlSecTransformDefaultPushBin`

```c
int xmlSecTransformDefaultPushBin(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L474)

Processes binary data via execute method and pushes results.

Process binary `data` by calling transform's execute method and pushes results to next transform. 

**Parameters:**

- `transform` — the pointer to transform object.
- `data` — the input binary data,
- `dataSize` — the input data size.
- `final` — the flag: if set to 1 then it's the last data chunk.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformDefaultPopBin`

```c
int xmlSecTransformDefaultPopBin(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L479)

Pops and processes data via execute method, returns result.

Pops data from previous transform in the chain, processes data by calling transform's execute method and returns result in the `data` buffer. The size of returned data is placed in the `dataSize`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `data` — the buffer to store result data.
- `maxDataSize` — the size of the buffer `data`.
- `dataSize` — the pointer to returned data size.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformDefaultPushXml`

```c
int xmlSecTransformDefaultPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L484)

Processes nodes via execute method and pushes result.

Processes `nodes` by calling transform's execute method and pushes result to the next transform in the chain. 

**Parameters:**

- `transform` — the pointer to transform object.
- `nodes` — the input nodes.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformDefaultPopXml`

```c
int xmlSecTransformDefaultPopXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L487)

Pops data, processes via execute method, and returns result nodes.

Pops data from previous transform in the chain, processes the data by calling transform's execute method and returns result in `nodes`. 

**Parameters:**

- `transform` — the pointer to transform object.
- `nodes` — the pointer to store popinter to result nodes.
- `transformCtx` — the pointer to transform context object.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformCreateOutputBuffer`

```c
xmlOutputBufferPtr xmlSecTransformCreateOutputBuffer(xmlSecTransformPtr transform, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L496)

Creates an output buffer to write data to `transform`.

Creates output buffer to write data to `transform`. 

**Parameters:**

- `transform` — the pointer to transform.
- `transformCtx` — the pointer to transform context object.


**Returns:** pointer to new output buffer or NULL if an error occurs.

---

### `xmlSecTransformCreateInputBuffer`

```c
xmlParserInputBufferPtr xmlSecTransformCreateInputBuffer(xmlSecTransformPtr transform, xmlSecTransformCtxPtr transformCtx);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L498)

Creates an input buffer to read data from `transform`.

Creates input buffer to read data from `transform`. 

**Parameters:**

- `transform` — the pointer to transform.
- `transformCtx` — the pointer to transform context object.


**Returns:** pointer to new input buffer or NULL if an error occurs.

---

### `xmlSecTransformIdListGetKlass`

```c
xmlSecPtrListId xmlSecTransformIdListGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L715)

The transform id list klass.

**Returns:** pointer to the transform id list klass.

---

### `xmlSecTransformIdListFind`

```c
int xmlSecTransformIdListFind(xmlSecPtrListPtr list, xmlSecTransformId transformId);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L716)

Lookups `dataId` in `list`.

**Parameters:**

- `list` — the pointer to transform ids list.
- `transformId` — the transform klass.


**Returns:** 1 if `dataId` is found in the `list`, 0 if not and a negative value if an error occurs.

---

### `xmlSecTransformIdListFindByHref`

```c
xmlSecTransformId xmlSecTransformIdListFindByHref(xmlSecPtrListPtr list, const xmlChar *href, xmlSecTransformUsage usage);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L718)

Looks up a transform klass by href and usage in the list.

Lookups data klass in the list with given `href` and `usage` in `list`. 

**Parameters:**

- `list` — the pointer to transform ids list.
- `href` — the desired transform klass href.
- `usage` — the desired transform usage.


**Returns:** transform klass is found and NULL otherwise.

---

### `xmlSecTransformIdListFindByName`

```c
xmlSecTransformId xmlSecTransformIdListFindByName(xmlSecPtrListPtr list, const xmlChar *name, xmlSecTransformUsage usage);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L721)

Looks up a transform klass by name and usage in the list.

Lookups data klass in the list with given `name` and `usage` in `list`. 

**Parameters:**

- `list` — the pointer to transform ids list.
- `name` — the desired transform klass name.
- `usage` — the desired transform usage.


**Returns:** transform klass is found and NULL otherwise.

---

### `xmlSecTransformIdListDebugDump`

```c
void xmlSecTransformIdListDebugDump(xmlSecPtrListPtr list, FILE *output);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L724)

Prints transform ids list debug information to `output`.

Prints binary transform debug information to `output`. 

**Parameters:**

- `list` — the pointer to transform ids list.
- `output` — the pointer to output FILE.

---

### `xmlSecTransformIdListDebugXmlDump`

```c
void xmlSecTransformIdListDebugXmlDump(xmlSecPtrListPtr list, FILE *output);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L726)

Prints transform ids list debug information to `output` in XML format.

Prints binary transform debug information to `output` in XML format. 

**Parameters:**

- `list` — the pointer to transform ids list.
- `output` — the pointer to output FILE.

---

### `xmlSecTransformBase64GetKlass`

```c
xmlSecTransformId xmlSecTransformBase64GetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L745)

Gets the Base64 transform klass.

The Base64 transform klass ([http://www.w3.org/TR/xmldsig-core/#sec-Base-64](http://www.w3.org/TR/xmldsig-core/#sec-Base-64)). The normative specification for base64 decoding transforms is RFC 2045 ([http://www.ietf.org/rfc/rfc2045.txt](http://www.ietf.org/rfc/rfc2045.txt)). The base64 Transform element has no content. The input is decoded by the algorithms. This transform is useful if an application needs to sign the raw data associated with the encoded content of an element. 

**Returns:** base64 transform id.

---

### `xmlSecTransformBase64SetLineSize`

```c
void xmlSecTransformBase64SetLineSize(xmlSecTransformPtr transform, xmlSecSize lineSize);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L746)

Sets the max line size to `lineSize`.

**Parameters:**

- `transform` — the pointer to BASE64 encode transform.
- `lineSize` — the new max line size.

---

### `xmlSecTransformInclC14NGetKlass`

```c
xmlSecTransformId xmlSecTransformInclC14NGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L754)

Gets the inclusive C14N transform klass.

Inclusive (regular) canonicalization that omits comments transform klass ([http://www.w3.org/TR/xmldsig-core/#sec-c14nAlg](http://www.w3.org/TR/xmldsig-core/#sec-c14nAlg) and [http://www.w3.org/TR/2001/REC-xml-c14n-20010315](http://www.w3.org/TR/2001/REC-xml-c14n-20010315)). 

**Returns:** c14n transform id.

---

### `xmlSecTransformInclC14NWithCommentsGetKlass`

```c
xmlSecTransformId xmlSecTransformInclC14NWithCommentsGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L762)

Gets the inclusive C14N with comments transform klass.

Inclusive (regular) canonicalization that includes comments transform klass ([http://www.w3.org/TR/xmldsig-core/#sec-c14nAlg](http://www.w3.org/TR/xmldsig-core/#sec-c14nAlg) and [http://www.w3.org/TR/2001/REC-xml-c14n-20010315](http://www.w3.org/TR/2001/REC-xml-c14n-20010315)). 

**Returns:** c14n with comments transform id.

---

### `xmlSecTransformInclC14N11GetKlass`

```c
xmlSecTransformId xmlSecTransformInclC14N11GetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L770)

Gets the C14N v1.1 transform klass.

C14N version 1.1 ([http://www.w3.org/TR/xml-c14n11](http://www.w3.org/TR/xml-c14n11)) 

**Returns:** c14n v1.1 transform id.

---

### `xmlSecTransformInclC14N11WithCommentsGetKlass`

```c
xmlSecTransformId xmlSecTransformInclC14N11WithCommentsGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L778)

Gets the C14N v1.1 with comments transform klass.

C14N version 1.1 ([http://www.w3.org/TR/xml-c14n11](http://www.w3.org/TR/xml-c14n11)) with comments 

**Returns:** c14n v1.1 with comments transform id.

---

### `xmlSecTransformExclC14NGetKlass`

```c
xmlSecTransformId xmlSecTransformExclC14NGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L786)

Gets the exclusive C14N transform klass.

Exclusive canoncicalization that omits comments transform klass ([http://www.w3.org/TR/xml-exc-c14n/](http://www.w3.org/TR/xml-exc-c14n/)). 

**Returns:** exclusive c14n transform id.

---

### `xmlSecTransformExclC14NWithCommentsGetKlass`

```c
xmlSecTransformId xmlSecTransformExclC14NWithCommentsGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L793)

Gets the exclusive C14N with comments transform klass.

Exclusive canoncicalization that includes comments transform klass ([http://www.w3.org/TR/xml-exc-c14n/](http://www.w3.org/TR/xml-exc-c14n/)). 

**Returns:** exclusive c14n with comments transform id.

---

### `xmlSecTransformEnvelopedGetKlass`

```c
xmlSecTransformId xmlSecTransformEnvelopedGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L800)

Gets the enveloped signature transform klass.

The enveloped transform klass ([http://www.w3.org/TR/xmldsig-core/#sec-EnvelopedSignature](http://www.w3.org/TR/xmldsig-core/#sec-EnvelopedSignature)):

An enveloped signature transform T removes the whole Signature element containing T from the digest calculation of the Reference element containing T. The entire string of characters used by an XML processor to match the Signature with the XML production element is removed. The output of the transform is equivalent to the output that would result from replacing T with an XPath transform containing the following XPath parameter element:

```c
<XPathxmlns:dsig="...">
count(ancestor-or-self::dsig:Signature|
here()/ancestor::dsig:Signature[1])>
count(ancestor-or-self::dsig:Signature)
</XPath>
```

The input and output requirements of this transform are identical to those of the XPath transform, but may only be applied to a node-set from its parent XML document. Note that it is not necessary to use an XPath expression evaluator to create this transform. However, this transform MUST produce output in exactly the same manner as the XPath transform parameterized by the XPath expression above.

**Returns:** enveloped transform id.

---

### `xmlSecTransformXPathGetKlass`

```c
xmlSecTransformId xmlSecTransformXPathGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L807)

Gets the XPath transform klass.

The XPath transform evaluates given XPath expression and intersects the result with the previous nodes set. See [http://www.w3.org/TR/xmldsig-core/#sec-XPath](http://www.w3.org/TR/xmldsig-core/#sec-XPath) for more details. 

**Returns:** XPath transform id.

---

### `xmlSecTransformXPath2GetKlass`

```c
xmlSecTransformId xmlSecTransformXPath2GetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L814)

Gets the XPath2 transform klass.

The XPath2 transform ([http://www.w3.org/TR/xmldsig-filter2/](http://www.w3.org/TR/xmldsig-filter2/)). 

**Returns:** XPath2 transform klass.

---

### `xmlSecTransformXPointerGetKlass`

```c
xmlSecTransformId xmlSecTransformXPointerGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L821)

Gets the XPointer transform klass.

The XPointer transform klass ([https://www.rfc-editor.org/rfc/rfc9231.html](https://www.rfc-editor.org/rfc/rfc9231.html)). 

**Returns:** XPointer transform klass.

---

### `xmlSecTransformXPointerSetExpr`

```c
int xmlSecTransformXPointerSetExpr(xmlSecTransformPtr transform, const xmlChar *expr, xmlSecNodeSetType nodeSetType, xmlNodePtr hereNode);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L822)

Sets the XPointer expression for a transform.

Sets the XPointer expression for an XPointer `transform`. 

**Parameters:**

- `transform` — the pointer to XPointer transform.
- `expr` — the XPointer expression.
- `nodeSetType` — the type of evaluated XPointer expression.
- `hereNode` — the pointer to "here" node.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformRelationshipGetKlass`

```c
xmlSecTransformId xmlSecTransformRelationshipGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L831)

Gets the Relationship transform klass.

**Returns:** Relationship transform klass.

---

### `xmlSecTransformXsltGetKlass`

```c
xmlSecTransformId xmlSecTransformXsltGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L840)

Gets the XSLT transform klass.

XSLT transform klass ([http://www.w3.org/TR/xmldsig-core/#sec-XSLT](http://www.w3.org/TR/xmldsig-core/#sec-XSLT)):

The normative specification for XSL Transformations is [XSLT]. Specification of a namespace-qualified stylesheet element, which MUST be the sole child of the Transform element, indicates that the specified style sheet should be used. Whether this instantiates in-line processing of local XSLT declarations within the resource is determined by the XSLT processing model; the ordered application of multiple stylesheet may require multiple Transforms. No special provision is made for the identification of a remote stylesheet at a given URI because it can be communicated via an xsl:include or xsl:import within the stylesheet child of the Transform.

This transform requires an octet stream as input. If the actual input is an XPath node-set, then the signature application should attempt to convert it to octets (apply Canonical XML]) as described in the Reference Processing Model (section 4.3.3.2).]

The output of this transform is an octet stream. The processing rules for the XSL style sheet or transform element are stated in the XSLT specification [XSLT]. We RECOMMEND that XSLT transform authors use an output method of xml for XML and HTML. As XSLT implementations do not produce consistent serializations of their output, we further RECOMMEND inserting a transform after the XSLT transform to canonicalize the output. These steps will help to ensure interoperability of the resulting signatures among applications that support the XSLT transform. Note that if the output is actually HTML, then the result of these steps is logically equivalent [XHTML]. 

**Returns:** pointer to XSLT transform klass.

---

### `xmlSecTransformXsltSetDefaultSecurityPrefs`

```c
void xmlSecTransformXsltSetDefaultSecurityPrefs(xsltSecurityPrefsPtr sec);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L841)

Sets the default XSLT security preferences.

Sets the new default security preferences. The xmlsec default security policy is to disable everything. 

**Parameters:**

- `sec` — the new security preferences

---

### `xmlSecTransformRemoveXmlTagsC14NGetKlass`

```c
xmlSecTransformId xmlSecTransformRemoveXmlTagsC14NGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L850)

Gets the 'remove xml tags' transform klass.

The "remove xml tags" transform klass ([http://www.w3.org/TR/xmldsig-core/#sec-Base-64](http://www.w3.org/TR/xmldsig-core/#sec-Base-64)): Base64 transform requires an octet stream for input. If an XPath node-set (or sufficiently functional alternative) is given as input, then it is converted to an octet stream by performing operations logically equivalent to 1) applying an XPath transform with expression self::text(), then 2) taking the string-value of the node-set. Thus, if an XML element is identified by a barename XPointer in the Reference URI, and its content consists solely of base64 encoded character data, then this transform automatically strips away the start and end tags of the identified element and any of its descendant elements as well as any descendant comments and processing instructions. The output of this transform is an octet stream. 

**Returns:** "remove xml tags" transform id.

---

### `xmlSecTransformVisa3DHackGetKlass`

```c
xmlSecTransformId xmlSecTransformVisa3DHackGetKlass(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L861)

Gets the Visa3DHack transform klass.

The Visa3DHack transform klass. The only reason why we need this is Visa3D protocol. It doesn't follow XML/XPointer/XMLDSig specs and allows invalid XPointer expressions in the URI attribute. Since we couldn't evaluate such expressions thru XPath/XPointer engine, we need to have this hack here. 

**Returns:** Visa3DHack transform klass.

---

### `xmlSecTransformVisa3DHackSetID`

```c
int xmlSecTransformVisa3DHackSetID(xmlSecTransformPtr transform, const xmlChar *id);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L862)

Sets the ID value for an Visa3DHack `transform`.

**Parameters:**

- `transform` — the pointer to Visa3DHack transform.
- `id` — the ID value.


**Returns:** 0 on success or a negative value if an error occurs.

---

### `xmlSecTransformHmacGetMinOutputBitsSize`

```c
xmlSecSize xmlSecTransformHmacGetMinOutputBitsSize(void);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L874)

Gets the minimum size in bits for HMAC output.

**Returns:** the min HMAC output size in bits.

---

### `xmlSecTransformHmacSetMinOutputBitsSize`

```c
void xmlSecTransformHmacSetMinOutputBitsSize(xmlSecSize val);
```

*Source:* [include/xmlsec/transforms.h](https://github.com/lsh123/xmlsec/blob/1.3.11/include/xmlsec/transforms.h#L875)

Sets the min HMAC output size in bits.

Sets the min HMAC output size in bits. Low value for min output size might create a security vulnerability and is not recommended. 

**Parameters:**

- `val` — the new min hmac output size in bits.

---
