Home Download News Documentation FAQ Tutorial API reference Examples XML Digital Signature Online Verifier XML Encryption XML Canonicalization Reporting Bugs Mailing list Related Authors
# xmlsec ## Name xmlsec -- Utility functions. ## Synopsis
    typedef             xmlSecPtr;
    #define             xmlSecSize
    #define             XMLSEC_SIZE_BAD_CAST                (val)
    #define             xmlSecByte
    int                 xmlSecInit                          (void);
    int                 xmlSecShutdown                      (void);
    #define             xmlSecCheckVersionExact             ()
    #define             xmlSecCheckVersion                  ()
    enum                xmlSecCheckVersionMode;
    int                 xmlSecCheckVersionExt               (int major,
                                                             int minor,
                                                             int subminor,
                                                             xmlSecCheckVersionMode mode);
    #define             ATTRIBUTE_UNUSED
    #define             XMLSEC_PTR_TO_FUNC_IMPL             (func_type)
    #define             XMLSEC_PTR_TO_FUNC                  (func_type, ptr)
    #define             XMLSEC_FUNC_TO_PTR                  (func_type, func)
## Description Utility functions. ## Details ### xmlSecPtr
    typedef void*                                   xmlSecPtr;
Void pointer. ### xmlSecSize
    #define             xmlSecSize
Size of something. Should be typedef instead of define but it will break ABI (todo). ### XMLSEC_SIZE_BAD_CAST()
    #define XMLSEC_SIZE_BAD_CAST(val)               ((xmlSecSize)(val))
Bad cast to xmlSecSize
`val` : | the value to cast
### xmlSecByte
    #define xmlSecByte                              unsigned char
One byte. Should be typedef instead of define but it will break ABI (todo). ### xmlSecInit ()
    int                 xmlSecInit                          (void);
Initializes XML Security Library. The depended libraries (LibXML and LibXSLT) must be initialized before.
Returns : | 0 on success or a negative value otherwise.
### xmlSecShutdown ()
    int                 xmlSecShutdown                      (void);
Clean ups the XML Security Library.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCheckVersionExact()
    #define             xmlSecCheckVersionExact()
Macro. Returns 1 if the loaded xmlsec library version exactly matches the one used to compile the caller, 0 if it does not or a negative value if an error occurs. ### xmlSecCheckVersion()
    #define             xmlSecCheckVersion()
Macro. Returns 1 if the loaded xmlsec library version ABI compatible with the one used to compile the caller, 0 if it does not or a negative value if an error occurs. ### enum xmlSecCheckVersionMode
    typedef enum {
        xmlSecCheckVersionExactMatch = 0,
        xmlSecCheckVersionABICompatible
    } xmlSecCheckVersionMode;
The xmlsec library version mode.
`xmlSecCheckVersionExactMatch` | the version should match exactly.
`xmlSecCheckVersionABICompatible` | the version should be ABI compatible.
### xmlSecCheckVersionExt ()
    int                 xmlSecCheckVersionExt               (int major,
                                                             int minor,
                                                             int subminor,
                                                             xmlSecCheckVersionMode mode);
Checks if the loaded version of xmlsec library could be used.
`major` : | the major version number.
`minor` : | the minor version number.
`subminor` : | the subminor version number.
`mode` : | the version check mode.
Returns : | 1 if the loaded xmlsec library version is OK to use 0 if it is not or a negative value if an error occurs.
### ATTRIBUTE_UNUSED
    #define             ATTRIBUTE_UNUSED
Macro used to signal to GCC unused function parameters ### XMLSEC_PTR_TO_FUNC_IMPL()
    #define             XMLSEC_PTR_TO_FUNC_IMPL(func_type)
Macro declares helper functions to convert between "void *" pointer and function pointer.
`func_type` : | the function type.
### XMLSEC_PTR_TO_FUNC()
    #define             XMLSEC_PTR_TO_FUNC(func_type, ptr)
Macro converts from "void*" pointer to "func_type" function pointer.
`func_type` : | the function type.
`ptr` : | the "void*" pointer to be converted.
### XMLSEC_FUNC_TO_PTR()
    #define             XMLSEC_FUNC_TO_PTR(func_type, func)
Macro converts from "func_type" function pointer to "void*" pointer.
`func_type` : | the function type.
`func` : | the "func_type" function pointer to be converted.