title: Decoding Hex Encoded Value with Crypto++
body: <p>I'm new to Cryptopp and I wanted to encode text and decode back to understand how it works.
  The encoding part works fine but I cannot get the string decoded? Always the decoded string is empty. I asked in Crypto mailing and someone said this code should work but it does not.</p>
  
  <p>I would like to know what is wrong.
  Being new to crypto I cannot see what is wrong.</p>
  
  <p>The code:</p>
  
  <pre><code>std::string encoded = m_pkey-&gt;GetValue().ToStdString();//here under debugger its ok
  std::string decoded;
  CryptoPP::StringSource(encoded, true, new CryptoPP::HexDecoder(new CryptoPP::StringSink(decoded)));
  </code></pre>