>   CryptoPP::StringSource((const byte *)key.data(),
>     key.size(),
>  ...

On Aug 27, 8:17 am, Zed <[email protected]> wrote:
> I need to connect to a WebService, which is authenticates my signature
> using System.Convert .net namespace.
> In my C++ app I would like to use CryptoPP to decode a base64 key ..
>
>   std::string key =
> "ABCabcABCabcABCabcABCabcABCabcABCabcABCabcABCabcABCabcABCabcABCabcABCabcABCabcABCabcAB==";
>   string key_decoded;
>   CryptoPP::StringSource((const byte *)key,
>     key.size(),
>     true,
>     new CryptoPP::Base64Decoder(
>       new CryptoPP::StringSink(key_decoded)
>     )
>   );
>
>  byte * key_dec_bytes = (byte *)key_decoded.c_str();
>
> This works fine, except key_dec_bytes  is not the same as what a .net
> code returns ..
> byte[] key_dec_bytes = Convert.FromBase64String(key);
>
> I am a newbie to cryptography and don't have much understanding of
> things like byte ordering etc, so forgive me for asking a silly
> question .. but why do I get different results when using the two
> different approaches, and how can I achieve the same byte[] result as
> with .net?

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to