$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Zara (yozara_at_[hidden])
Date: 2007-11-26 02:12:28
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.
As you seee, you may do it only with standara library components, but
ther is no direct way to do it, you must go through unsigned longs
always.
Bes regards,
Zara