Re: [Boost-bugs] [Boost C++ Libraries] #9235: Construction from binary data

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9235: Construction from binary data
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-12 10:50:02


#9235: Construction from binary data
-------------------------------+----------------------------
  Reporter: psiha | Owner: johnmaddock
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.54.0 | Severity: Optimization
Resolution: wontfix | Keywords:
-------------------------------+----------------------------
Description changed by psiha:

Old 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..

New 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
 https://svn.boost.org/trac/boost/ticket/9243
 ...

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

--
-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9235#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC