bn: XML Security Library Reference Manual

Home Download News Documentation FAQ Tutorial API reference Examples XML Digital Signature Online Verifier XML Encryption XML Canonicalization Reporting Bugs Mailing list Related Authors
## bn bn — Big numbers helper functions. |
## Functions
BIGNUM * | xmlSecOpenSSLNodeGetBNValue ()
int | xmlSecOpenSSLNodeSetBNValue ()
## Description Big numbers helper functions. ## Functions ### xmlSecOpenSSLNodeGetBNValue ()
    BIGNUM *
    xmlSecOpenSSLNodeGetBNValue (const xmlNodePtr cur,
                                 BIGNUM **a);
Converts the node content from CryptoBinary format (http://www.w3.org/TR/xmldsig-core/sec-CryptoBinary) to a BIGNUM. If no BIGNUM buffer provided then a new BIGNUM is created (caller is responsible for freeing it). #### Parameters
cur | the poitner to an XML node. |
a | the BIGNUM buffer. |
#### Returns a pointer to BIGNUM produced from CryptoBinary string or NULL if an error occurs. ### xmlSecOpenSSLNodeSetBNValue ()
    int
    xmlSecOpenSSLNodeSetBNValue (xmlNodePtr cur,
                                 const BIGNUM *a,
                                 int addLineBreaks);
Converts BIGNUM to CryptoBinary string (http://www.w3.org/TR/xmldsig-core/sec-CryptoBinary) and sets it as the content of the given node. If the addLineBreaks is set then line breaks are added before and after the CryptoBinary string. #### Parameters
cur | the pointer to an XML node. |
a | the BIGNUM. |
addLineBreaks | if the flag is equal to 1 then linebreaks will be added before and after new buffer content. |
#### Returns 0 on success or -1 otherwise. ## Types and Values