| Top | 
| xmlSecEncCtxPtr | xmlSecEncCtxCreate () | 
| void | xmlSecEncCtxDestroy () | 
| int | xmlSecEncCtxInitialize () | 
| void | xmlSecEncCtxFinalize () | 
| int | xmlSecEncCtxCopyUserPref () | 
| void | xmlSecEncCtxReset () | 
| int | xmlSecEncCtxBinaryEncrypt () | 
| int | xmlSecEncCtxXmlEncrypt () | 
| int | xmlSecEncCtxUriEncrypt () | 
| int | xmlSecEncCtxDecrypt () | 
| xmlSecBufferPtr | xmlSecEncCtxDecryptToBuffer () | 
| void | xmlSecEncCtxDebugDump () | 
| void | xmlSecEncCtxDebugXmlDump () | 
| xmlSecKeyPtr | xmlSecEncCtxDerivedKeyGenerate () | 
| xmlSecKeyPtr | xmlSecEncCtxAgreementMethodGenerate () | 
| int | xmlSecEncCtxAgreementMethodXmlWrite () | 
| const char * | xmlSecEncCtxGetFailureReasonString () | 
| enum | xmlEncCtxMode | 
| enum | xmlSecEncFailureReason | 
| #define | XMLSEC_ENC_RETURN_REPLACED_NODE | 
| struct | xmlSecEncCtx | 
xmlSecEncCtxPtr
xmlSecEncCtxCreate (xmlSecKeysMngrPtr keysMngr);
Creates <enc:EncryptedData/> element processing context. The caller is responsible for destroying returned object by calling xmlSecEncCtxDestroy function.
void
xmlSecEncCtxDestroy (xmlSecEncCtxPtr encCtx);
Destroy context object created with xmlSecEncCtxCreate function.
int xmlSecEncCtxInitialize (xmlSecEncCtxPtr encCtx,xmlSecKeysMngrPtr keysMngr);
Initializes <enc:EncryptedData/> element processing context. The caller is responsible for cleaning up returned object by calling xmlSecEncCtxFinalize function.
encCtx  | 
the pointer to <enc:EncryptedData/> processing context.  | 
|
keysMngr  | 
the pointer to keys manager.  | 
void
xmlSecEncCtxFinalize (xmlSecEncCtxPtr encCtx);
Cleans up encCtx
 object.
int xmlSecEncCtxCopyUserPref (xmlSecEncCtxPtr dst,xmlSecEncCtxPtr src);
Copies user preference from src
 context to dst
.
void
xmlSecEncCtxReset (xmlSecEncCtxPtr encCtx);
Resets encCtx
 object, user settings are not touched.
int xmlSecEncCtxBinaryEncrypt (xmlSecEncCtxPtr encCtx,xmlNodePtr tmpl,const xmlSecByte *data,xmlSecSize dataSize);
Encrypts data
 according to template tmpl
.
encCtx  | 
the pointer to <enc:EncryptedData/> processing context.  | 
|
tmpl  | 
the pointer to <enc:EncryptedData/> template node.  | 
|
data  | 
the pointer for binary buffer.  | 
|
dataSize  | 
the   | 
int xmlSecEncCtxXmlEncrypt (xmlSecEncCtxPtr encCtx,xmlNodePtr tmpl,xmlNodePtr node);
Encrypts node
 according to template tmpl
. If requested, node
 is replaced
with result <enc:EncryptedData/> node.
encCtx  | 
the pointer to <enc:EncryptedData/> processing context.  | 
|
tmpl  | 
the pointer to <enc:EncryptedData/> template node.  | 
|
node  | 
the pointer to node for encryption.  | 
int xmlSecEncCtxUriEncrypt (xmlSecEncCtxPtr encCtx,xmlNodePtr tmpl,const xmlChar *uri);
Encrypts data from uri
 according to template tmpl
.
encCtx  | 
the pointer to <enc:EncryptedData/> processing context.  | 
|
tmpl  | 
the pointer to <enc:EncryptedData/> template node.  | 
|
uri  | 
the URI.  | 
int xmlSecEncCtxDecrypt (xmlSecEncCtxPtr encCtx,xmlNodePtr node);
Decrypts node
 and if necessary replaces node
 with decrypted data.
encCtx  | 
the pointer to <enc:EncryptedData/> processing context.  | 
|
node  | 
the pointer to <enc:EncryptedData/> node.  | 
xmlSecBufferPtr xmlSecEncCtxDecryptToBuffer (xmlSecEncCtxPtr encCtx,xmlNodePtr node);
Decrypts node
 data to the result.
encCtx  | 
the pointer to encryption processing context.  | 
|
node  | 
the pointer to <enc:EncryptedData/> node.  | 
void xmlSecEncCtxDebugDump (xmlSecEncCtxPtr encCtx,FILE *output);
Prints the debug information about encCtx
 to output
.
encCtx  | 
the pointer to <enc:EncryptedData/> processing context.  | 
|
output  | 
the pointer to output FILE.  | 
void xmlSecEncCtxDebugXmlDump (xmlSecEncCtxPtr encCtx,FILE *output);
Prints the debug information about encCtx
 to output
 in XML format.
encCtx  | 
the pointer to <enc:EncryptedData/> processing context.  | 
|
output  | 
the pointer to output FILE.  | 
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>
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>
encCtx  | 
the pointer to encryption processing context.  | 
|
keyId  | 
the expected key id, the actual derived key might have a different id.  | 
|
node  | 
the pointer to <enc:AgreementMethod/> node.  | 
|
keyInfoCtx  | 
the pointer to the "parent" key info context.  | 
int xmlSecEncCtxAgreementMethodXmlWrite (xmlSecEncCtxPtr encCtx,xmlNodePtr node,xmlSecKeyInfoCtxPtr keyInfoCtx);
const char *
xmlSecEncCtxGetFailureReasonString (xmlSecEncFailureReason failureReason);
Gets failure reason as a string.
Returns failure reason as a string.
The xmlSecEncCtx mode.
XML Encryption processing failure reason. The application should use the returned value from the encrypt/decrypt functions first.
#define XMLSEC_ENC_RETURN_REPLACED_NODE 0x00000001
If this flag is set, then the replaced node will be returned in the replacedNodeList
struct xmlSecEncCtx {
    /* these data user can set before performing the operation */
    void*                       userData;
    unsigned int                flags;
    unsigned int                flags2;
    xmlEncCtxMode               mode;
    xmlSecKeyInfoCtx            keyInfoReadCtx;
    xmlSecKeyInfoCtx            keyInfoWriteCtx;
    xmlSecTransformCtx          transformCtx;
    xmlSecTransformId           defEncMethodId;
    /* these data are returned */
    xmlSecKeyPtr                encKey;
    xmlSecTransformOperation    operation;
    xmlSecBufferPtr             result;
    int                         resultBase64Encoded;
    int                         resultReplaced;
    xmlSecTransformPtr          encMethod;
    xmlSecEncFailureReason      failureReason;
    /* attributes from EncryptedData or EncryptedKey */
    xmlChar*                    id;
    xmlChar*                    type;
    xmlChar*                    mimeType;
    xmlChar*                    encoding;
    xmlChar*                    recipient;
    xmlChar*                    carriedKeyName;
    /* these are internal data, nobody should change that except us */
    xmlNodePtr                  encDataNode;
    xmlNodePtr                  encMethodNode;
    xmlNodePtr                  keyInfoNode;
    xmlNodePtr                  cipherValueNode;
    xmlNodePtr                  replacedNodeList; /* the pointer to the replaced node */
    void*                       reserved1;        /* reserved for future */
};
XML Encryption context.
the pointer to user data (xmlsec and xmlsec-crypto libraries never touches this).  | 
||
the XML Encryption processing flags.  | 
||
the XML Encryption processing flags.  | 
||
xmlEncCtxMode   | 
the mode.  | 
|
xmlSecKeyInfoCtx   | 
the reading key context.  | 
|
xmlSecKeyInfoCtx   | 
the writing key context (not used for signature verification).  | 
|
xmlSecTransformCtx   | 
the transforms processing context.  | 
|
the default encryption method (used if <enc:EncryptionMethod/> node is not present).  | 
||
xmlSecKeyPtr   | 
the signature key; application may set encKey before calling encryption/decryption functions.  | 
|
xmlSecTransformOperation   | 
the operation: encrypt or decrypt.  | 
|
xmlSecBufferPtr   | 
the pointer to signature (not valid for signature verification).  | 
|
the flag: if set then result in result is base64 encoded.  | 
||
the flag: if set then resulted <enc:EncryptedData/> or <enc:EncryptedKey/> node is added to the document.  | 
||
xmlSecTransformPtr   | 
the pointer to encryption transform.  | 
|
xmlSecEncFailureReason   | 
the detailed failure reason.  | 
|
the ID attribute of <enc:EncryptedData/> or <enc:EncryptedKey/> node.  | 
||
the Type attribute of <enc:EncryptedData/> or <enc:EncryptedKey/> node.  | 
||
the MimeType attribute of <enc:EncryptedData/> or <enc:EncryptedKey/> node.  | 
||
the Encoding attributeof <enc:EncryptedData/> or <enc:EncryptedKey/> node.  | 
||
the Recipient attribute of <enc:EncryptedKey/> node..  | 
||
the CarriedKeyName attribute of <enc:EncryptedKey/> node.  | 
||
the pointer to <enc:EncryptedData/> or <enc:EncryptedKey/> node.  | 
||
the pointer to <enc:EncryptionMethod/> node.  | 
||
the pointer to <enc:KeyInfo/> node.  | 
||
the pointer to <enc:CipherValue/> node.  | 
||
the first node of the list of replaced nodes depending on the nodeReplacementMode  | 
||
reserved for the future.  |