26 Nov
2007
26 Nov
'07
7:12 a.m.
On Sun, 25 Nov 2007 21:13:15 +0100, "Stefan Arentz"
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