I am having difficultly getting the following code to work in a G++
4.2 or 4.1 environment. It does compile just fine on WinXP / VC++8
CryptoPP::StringSource( EncodedText, true,
new CryptoPP::Base32Decoder(
new CryptoPP::StreamTransformationFilter( Decryptor,
new CryptoPP::StringSink( RecoveredText )
) // StreamTransformationFilter
) // Base32Decoder
); // StringSource
Firstly by putting in a (CryptoPP::BufferedTransformation*) before
"new CryptoPP::Base32Decoder(" sorts out the can't find matching
statement compile error ...
i.e
166 CryptoPP::StringSource( EncodedText, true,
167 (CryptoPP::BufferedTransformation*) new
CryptoPP::Base32Decoder(
168 new CryptoPP::StreamTransformationFilter( Decryptor,
169 new CryptoPP::StringSink( RecoveredText )
170 ) // StreamTransformationFilter
171 ) // Base32Decoder
172 ); // StringSource
... but then I get
*** ndCrypto.cpp:166: error: expected primary-expression before '('
token
*** ndCrypto.cpp:167: error: expected primary-expression before '*'
token
*** ndCrypto.cpp:167: error: expected primary-expression before ')'
token
errors instead.
The stumbling block seems to be the Base32Decoder bit, as taking that
out of the statement results in a working compile.
So I tried:
CryptoPP::StringSource ( EncodedText, true, new
CryptoPP::Base32Decoder() );
Again match can't be found by comiler with error:
*** ndCrypto.cpp:164: error: no matching function for call to
'CryptoPP::StringSource::StringSource(std::string&, bool, int*)'
*** /usr/local/include/cryptopp/filters.h:743: note: candidates are:
CryptoPP::StringSource::StringSource(const std::string&, bool,
CryptoPP::BufferedTransformation*)
*** /usr/local/include/cryptopp/filters.h:740: note:
CryptoPP::StringSource::StringSource(const byte*, size_t, bool,
CryptoPP::BufferedTransformation*)
*** /usr/local/include/cryptopp/filters.h:737: note:
CryptoPP::StringSource::StringSource(const char*, bool,
CryptoPP::BufferedTransformation*)
*** /usr/local/include/cryptopp/filters.h:734: note:
CryptoPP::StringSource::StringSource(CryptoPP::BufferedTransformation*)
*** /usr/local/include/cryptopp/filters.h:732: note:
CryptoPP::StringSource::StringSource(const CryptoPP::StringSource&)
and putting the cast in results in:
*** ndCrypto.cpp:164: error: expected primary-expression before '('
token
*** ndCrypto.cpp:164: error: expected primary-expression before '*'
token
*** ndCrypto.cpp:164: error: expected primary-expression before ')'
token
Any help would be appreciated.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---