24#include <com/sun/star/uno/Sequence.hxx>
35 const xmlSecByte* bnInteger ;
41 chNumeral = xmlStrndup(
reinterpret_cast<const xmlChar*
>(onumeral.getStr()),
static_cast<int>(onumeral.getLength()) ) ;
43 if( xmlSecBnInitialize( &bn, 0 ) < 0 ) {
44 xmlFree( chNumeral ) ;
48 if( xmlSecBnFromDecString( &bn, chNumeral ) < 0 ) {
49 xmlFree( chNumeral ) ;
50 xmlSecBnFinalize( &bn ) ;
54 xmlFree( chNumeral ) ;
56 length = xmlSecBnGetSize( &bn ) ;
58 xmlSecBnFinalize( &bn ) ;
62 bnInteger = xmlSecBnGetData( &bn ) ;
63 if( bnInteger ==
nullptr ) {
64 xmlSecBnFinalize( &bn ) ;
70 xmlSecBnFinalize( &bn ) ;
82 if( xmlSecBnInitialize( &bn, 0 ) < 0 )
85 if( xmlSecBnSetData( &bn,
reinterpret_cast<const unsigned char*
>(
integer.getConstArray()),
integer.getLength() ) < 0 ) {
86 xmlSecBnFinalize( &bn ) ;
90 chNumeral = xmlSecBnToDecString( &bn ) ;
91 if( chNumeral ==
nullptr ) {
92 xmlSecBnFinalize( &bn ) ;
96 aRet = OUString::createFromAscii(
reinterpret_cast<char*
>(chNumeral) ) ;
98 xmlSecBnFinalize( &bn ) ;
99 xmlFree( chNumeral ) ;
::boost::spirit::classic::rule< ScannerT > integer
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
OUString bigIntegerToNumericString(const Sequence< sal_Int8 > &integer)
Sequence< sal_Int8 > numericStringToBigInteger(std::u16string_view numeral)