Functions
xmlSecEncCtxFinalize ()
void
xmlSecEncCtxFinalize (xmlSecEncCtxPtr encCtx);
Cleans up encCtx
object.
xmlSecEncCtxCopyUserPref ()
int
xmlSecEncCtxCopyUserPref (xmlSecEncCtxPtr dst,
xmlSecEncCtxPtr src);
Copies user preference from src
context to dst
.
Returns
0 on success or a negative value if an error occurs.
xmlSecEncCtxReset ()
void
xmlSecEncCtxReset (xmlSecEncCtxPtr encCtx);
Resets encCtx
object, user settings are not touched.
xmlSecEncCtxBinaryEncrypt ()
int
xmlSecEncCtxBinaryEncrypt (xmlSecEncCtxPtr encCtx,
xmlNodePtr tmpl,
const xmlSecByte *data,
xmlSecSize dataSize);
Encrypts data
according to template tmpl
.
Returns
0 on success or a negative value if an error occurs.
xmlSecEncCtxXmlEncrypt ()
int
xmlSecEncCtxXmlEncrypt (xmlSecEncCtxPtr encCtx,
xmlNodePtr tmpl,
xmlNodePtr node);
Encrypts node
according to template tmpl
. If requested, node
is replaced
with result <enc:EncryptedData/> node.
Returns
0 on success or a negative value if an error occurs.
xmlSecEncCtxUriEncrypt ()
int
xmlSecEncCtxUriEncrypt (xmlSecEncCtxPtr encCtx,
xmlNodePtr tmpl,
const xmlChar *uri);
Encrypts data from uri
according to template tmpl
.
Returns
0 on success or a negative value if an error occurs.
xmlSecEncCtxDecrypt ()
int
xmlSecEncCtxDecrypt (xmlSecEncCtxPtr encCtx,
xmlNodePtr node);
Decrypts node
and if necessary replaces node
with decrypted data.
Returns
0 on success or a negative value if an error occurs.
xmlSecEncCtxDecryptToBuffer ()
xmlSecBufferPtr
xmlSecEncCtxDecryptToBuffer (xmlSecEncCtxPtr encCtx,
xmlNodePtr node);
Decrypts node
data to the result.
Returns
a buffer with key on success or NULL if an error occurs.
xmlSecEncCtxDebugDump ()
void
xmlSecEncCtxDebugDump (xmlSecEncCtxPtr encCtx,
FILE *output);
Prints the debug information about encCtx
to output
.
xmlSecEncCtxDebugXmlDump ()
void
xmlSecEncCtxDebugXmlDump (xmlSecEncCtxPtr encCtx,
FILE *output);
Prints the debug information about encCtx
to output
in XML format.
xmlSecEncCtxDerivedKeyGenerate ()
xmlSecKeyPtr
xmlSecEncCtxDerivedKeyGenerate (xmlSecEncCtxPtr encCtx,
xmlSecKeyDataId keyId,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx);
Generates (derives) key from node
(https://www.w3.org/TR/xmlenc-core1/sec-DerivedKey):
<element name="DerivedKey" type="xenc11:DerivedKeyType"/>
<complexType name="DerivedKeyType">
<sequence>
<element ref="xenc11:KeyDerivationMethod" minOccurs="0"/>
<element ref="xenc:ReferenceList" minOccurs="0"/>
<element name="DerivedKeyName" type="string" minOccurs="0"/>
<element name="MasterKeyName" type="string" minOccurs="0"/>
</sequence>
<attribute name="Recipient" type="string" use="optional"/>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="Type" type="anyURI" use="optional"/>
</complexType>
<element name="KeyDerivationMethod" type="xenc:KeyDerivationMethodType"/>
<complexType name="KeyDerivationMethodType">
<sequence>
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
Returns
the derived key on success or NULL if an error occurs.
xmlSecEncCtxAgreementMethodGenerate ()
xmlSecKeyPtr
xmlSecEncCtxAgreementMethodGenerate (xmlSecEncCtxPtr encCtx,
xmlSecKeyDataId keyId,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx);
Generates (derives) key from node
(https://www.w3.org/TR/xmlenc-core1/sec-AgreementMethod):
<element name="AgreementMethod" type="xenc:AgreementMethodType"/>
<complexType name="AgreementMethodType" mixed="true">
<sequence>
<element name="KA-Nonce" minOccurs="0" type="base64Binary"/>
<!-- <element ref="ds:DigestMethod" minOccurs="0"/> -->
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
<element name="OriginatorKeyInfo" minOccurs="0" type="ds:KeyInfoType"/>
<element name="RecipientKeyInfo" minOccurs="0" type="ds:KeyInfoType"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
Returns
the generated key on success or NULL if an error occurs.
xmlSecEncCtxGetFailureReasonString ()
const char *
xmlSecEncCtxGetFailureReasonString (xmlSecEncFailureReason failureReason);
Gets failure reason as a string.
Returns failure reason as a string.