Boost logo

Boost Users :

From: Stefan Arentz (stefan.arentz_at_[hidden])
Date: 2007-11-26 07:41:32


On 11/26/07, Zara <yozara_at_[hidden]> wrote:
> On Sun, 25 Nov 2007 21:13:15 +0100, "Stefan Arentz"
> <stefan.arentz_at_[hidden]> wrote:
>
> >Is there something in Boost that can help me decode hex strings into
> >binary form? For example hexadecimal strings that contain MD5 hashes.
> >
> > S.
>
>
> Yoy may divide the hex string into shorter parts that fit within un
> unsigned long and read them into unsigned long using std::istream,
> then convert them into std::bitset or boost::dynamic_bitset, and
> further convert them into binary representation using std::ostream.

Sure. I'm doing the conversion manually now, but I had hoped for some
kind of 'codec' component in Boost. Now it's hex but maybe later I
need to decode/encode base64 for example. It sounds like a good
candidate for a future library.

 S.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net