Opened 9 years ago

Last modified 7 years ago

#9235 closed Feature Requests

Construction from binary data — at Initial Version

Reported by: Domagoj Šarić Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.54.0 Severity: Optimization
Keywords: Cc:

Description

I didn't find a way to directly construct fixed sized cpp_int from existing binary data (a static array, for example an RSA key hardcoded into a .cpp after being generated with OpenSSL)... I had to resort to either using the from-string constructor or inserting the data byte by byte with 8 bit shifts and or-ing in a loop both of which are ugly and inefficient (https://svn.boost.org/trac/boost/ticket/9233, https://svn.boost.org/trac/boost/ticket/9234)...

Ideally it would be possible to create static fixed size numbers as one creates PODs, without a dynamic initializer being created by the compiler..

Change History (0)

Note: See TracTickets for help on using tickets.