XML Security Library

LibXML2
LibXSLT
OpenSSL

xmlenc

Name

xmlenc -- 

Synopsis


enum        xmlEncCtxMode;
struct      xmlSecEncCtx;
xmlSecEncCtxPtr xmlSecEncCtxCreate          (xmlSecKeysMngrPtr keysMngr);
void        xmlSecEncCtxDestroy             (xmlSecEncCtxPtr encCtx);
int         xmlSecEncCtxInitialize          (xmlSecEncCtxPtr encCtx,
                                             xmlSecKeysMngrPtr keysMngr);
void        xmlSecEncCtxFinalize            (xmlSecEncCtxPtr encCtx);
int         xmlSecEncCtxCopyUserPref        (xmlSecEncCtxPtr dst,
                                             xmlSecEncCtxPtr src);
void        xmlSecEncCtxReset               (xmlSecEncCtxPtr encCtx);
int         xmlSecEncCtxBinaryEncrypt       (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr tmpl,
                                             unsigned char *data,
                                             size_t dataSize);
int         xmlSecEncCtxXmlEncrypt          (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr tmpl,
                                             xmlNodePtr node);
int         xmlSecEncCtxUriEncrypt          (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr tmpl,
                                             const xmlChar *uri);
int         xmlSecEncCtxDecrypt             (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr node);
xmlSecBufferPtr xmlSecEncCtxDecryptToBuffer (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr node);
void        xmlSecEncCtxDebugDump           (xmlSecEncCtxPtr encCtx,
                                             FILE *output);
void        xmlSecEncCtxDebugXmlDump        (xmlSecEncCtxPtr encCtx,
                                             FILE *output);

Description

Details

enum xmlEncCtxMode

typedef enum {
    xmlEncCtxModeEncryptedData = 0,
    xmlEncCtxModeEncryptedKey
} xmlEncCtxMode;

The xmlSecEncCtx mode.

xmlEncCtxModeEncryptedData the <enc:EncryptedData/> element procesing.
xmlEncCtxModeEncryptedKey the <enc:EncryptedKey/> element processing.


struct xmlSecEncCtx

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;

    /* 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;
    
    /* reserved for future */
    void*			reserved0;
    void*			reserved1;
};

XML Encrypiton context.

void *userData the pointer to user data (xmlsec and xmlsec-crypto libraries never touches this).
unsigned int flags the XML Encryption processing flags.
unsigned int flags2 the XML Encryption processing flags.
xmlEncCtxMode mode the mode.
xmlSecKeyInfoCtx keyInfoReadCtx the reading key context.
xmlSecKeyInfoCtx keyInfoWriteCtx the writing key context (not used for signature verification).
xmlSecTransformCtx transformCtx the transforms processing context.
xmlSecTransformId defEncMethodId the default encryption method (used if <enc:EncryptionMethod/> node is not present).
xmlSecKeyPtr encKey the signature key; application may set encKey before calling encryption/decryption functions.
xmlSecTransformOperation operation the operation: encrypt or decrypt.
xmlSecBufferPtr result the pointer to signature (not valid for signature verificaction).
int resultBase64Encoded the flag: if set then result in result is base64 encoded.
int resultReplaced the flag: if set then resulted <enc:EncryptedData/> or <enc:EncryptedKey/> node is added to the document.
xmlSecTransformPtr encMethod the pointer to encryption transform.
xmlChar *id the ID attribute of <enc:EncryptedData/> or <enc:EncryptedKey/> node.
xmlChar *type the Type attribute of <enc:EncryptedData/> or <enc:EncryptedKey/> node.
xmlChar *mimeType the MimeType attribute of <enc:EncryptedData/> or <enc:EncryptedKey/> node.
xmlChar *encoding the Encoding attributeof <enc:EncryptedData/> or <enc:EncryptedKey/> node.
xmlChar *recipient the Recipient attribute of <enc:EncryptedKey/> node..
xmlChar *carriedKeyName the CarriedKeyName attribute of <enc:EncryptedKey/> node.
xmlNodePtr encDataNode the pointer to <enc:EncryptedData/> or <enc:EncryptedKey/> node.
xmlNodePtr encMethodNode the pointer to <enc:EncryptionMethod/> node.
xmlNodePtr keyInfoNode the pointer to <enc:KeyInfo/> node.
xmlNodePtr cipherValueNode the pointer to <enc:CipherValue/> node.
void *reserved0 reserved for the future.
void *reserved1 reserved for the future.


xmlSecEncCtxCreate ()

xmlSecEncCtxPtr xmlSecEncCtxCreate          (xmlSecKeysMngrPtr keysMngr);

keysMngr :  
Returns :  


xmlSecEncCtxDestroy ()

void        xmlSecEncCtxDestroy             (xmlSecEncCtxPtr encCtx);

encCtx :  


xmlSecEncCtxInitialize ()

int         xmlSecEncCtxInitialize          (xmlSecEncCtxPtr encCtx,
                                             xmlSecKeysMngrPtr keysMngr);

encCtx :  
keysMngr :  
Returns :  


xmlSecEncCtxFinalize ()

void        xmlSecEncCtxFinalize            (xmlSecEncCtxPtr encCtx);

encCtx :  


xmlSecEncCtxCopyUserPref ()

int         xmlSecEncCtxCopyUserPref        (xmlSecEncCtxPtr dst,
                                             xmlSecEncCtxPtr src);

dst :  
src :  
Returns :  


xmlSecEncCtxReset ()

void        xmlSecEncCtxReset               (xmlSecEncCtxPtr encCtx);

encCtx :  


xmlSecEncCtxBinaryEncrypt ()

int         xmlSecEncCtxBinaryEncrypt       (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr tmpl,
                                             unsigned char *data,
                                             size_t dataSize);

encCtx :  
tmpl :  
data :  
dataSize :  
Returns :  


xmlSecEncCtxXmlEncrypt ()

int         xmlSecEncCtxXmlEncrypt          (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr tmpl,
                                             xmlNodePtr node);

encCtx :  
tmpl :  
node :  
Returns :  


xmlSecEncCtxUriEncrypt ()

int         xmlSecEncCtxUriEncrypt          (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr tmpl,
                                             const xmlChar *uri);

encCtx :  
tmpl :  
uri :  
Returns :  


xmlSecEncCtxDecrypt ()

int         xmlSecEncCtxDecrypt             (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr node);

encCtx :  
node :  
Returns :  


xmlSecEncCtxDecryptToBuffer ()

xmlSecBufferPtr xmlSecEncCtxDecryptToBuffer (xmlSecEncCtxPtr encCtx,
                                             xmlNodePtr node);

encCtx :  
node :  
Returns :  


xmlSecEncCtxDebugDump ()

void        xmlSecEncCtxDebugDump           (xmlSecEncCtxPtr encCtx,
                                             FILE *output);

encCtx :  
output :  


xmlSecEncCtxDebugXmlDump ()

void        xmlSecEncCtxDebugXmlDump        (xmlSecEncCtxPtr encCtx,
                                             FILE *output);

encCtx :  
output :  



Aleksey Sanin