Replace every string with std::string
 
Regards,
Maged

-----Original Message-----
From: Julia Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 15, 2003 5:20 PM
To: [EMAIL PROTECTED]
Subject: Can somebody explain this?



I wrote a bunch of C++ code to use Crypto++ under windows and am now trying
to get it to compile under Linux. Code that compiles fine under VC++ won't
resolve under GCC. It does seem like GCC 3.2.2 has a number of problems with
namespaces not found in VC++ 6.0.

I'd like to know how to fix this. =) 

--source-- 
using namespace std; 
using namespace CryptoPP; 
[etc] 

void foo( string& rska, string& text, string& sig ) 
{ 
                StringSink sink( sig ); 

                Base64Decoder * dec = new Base64Decoder(); 

                RSASSA_PKCS1v15_SHA_Signer privkey( StringSource( rsak,
true, dec ) ); 

                /* some mumble about strings not being stored contiguously
-- sec block does */ 
                SecByteBlock ssig( privkey.SignatureLength() ); 

                privkey.SignMessage( s_random, (byte const*) text.data(),
text.size(), ssig.begin() ); 

                sink.Put( ssig.begin(), ssig.size() ); 
} 
--compile-- 

security/Provider.cpp: In function `void 
   xxsign(macrosafe::Ref<CryptoPP::PrivateKey>&, std::string&,
std::string&)': 
security/Provider.cpp:31: no matching function for call to ` 
 
CryptoPP::PK_FinalTemplate<CryptoPP::TF_SignerImpl<CryptoPP::TF_SignatureSch
emeOptions<CryptoPP::TF_SS<CryptoPP::PKCS1v15,

   CryptoPP::SHA, CryptoPP::RSA, int>, CryptoPP::RSA, 
   CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA> > >:: 
   PK_FinalTemplate(CryptoPP::StringSource)' 
crypto/pubkey.h:1516: candidates are: 
 
CryptoPP::PK_FinalTemplate<CryptoPP::TF_SignerImpl<CryptoPP::TF_SignatureSch
emeOptions<CryptoPP::TF_SS<CryptoPP::PKCS1v15,

   CryptoPP::SHA, CryptoPP::RSA, int>, CryptoPP::RSA, 
   CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA> > 
   >::PK_FinalTemplate(const 
 
CryptoPP::PK_FinalTemplate<CryptoPP::TF_SignerImpl<CryptoPP::TF_SignatureSch
emeOptions<CryptoPP::TF_SS<CryptoPP::PKCS1v15,

   CryptoPP::SHA, CryptoPP::RSA, int>, CryptoPP::RSA, 
   CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA> > >&) 
crypto/pubkey.h:1533:                 
 
CryptoPP::PK_FinalTemplate<BASE>::PK_FinalTemplate(CryptoPP::BufferedTransfo
rmation&) 
   [with BASE = 
 
CryptoPP::TF_SignerImpl<CryptoPP::TF_SignatureSchemeOptions<CryptoPP::TF_SS<
CryptoPP::PKCS1v15, 
   CryptoPP::SHA, CryptoPP::RSA, int>, CryptoPP::RSA, 
   CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA> >] 
crypto/pubkey.h:1523:                 
   CryptoPP::PK_FinalTemplate<BASE>::PK_FinalTemplate(BASE::KeyClass&) [with

   BASE = 
 
CryptoPP::TF_SignerImpl<CryptoPP::TF_SignatureSchemeOptions<CryptoPP::TF_SS<
CryptoPP::PKCS1v15, 
   CryptoPP::SHA, CryptoPP::RSA, int>, CryptoPP::RSA, 
   CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA> >] 
crypto/pubkey.h:1521:                 
   CryptoPP::PK_FinalTemplate<BASE>::PK_FinalTemplate(const
CryptoPP::Integer&) 
   [with BASE = 
 
CryptoPP::TF_SignerImpl<CryptoPP::TF_SignatureSchemeOptions<CryptoPP::TF_SS<
CryptoPP::PKCS1v15, 
   CryptoPP::SHA, CryptoPP::RSA, int>, CryptoPP::RSA, 
   CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA> >] 
crypto/pubkey.h:1518:                 
   CryptoPP::PK_FinalTemplate<BASE>::PK_FinalTemplate() [with BASE = 
 
CryptoPP::TF_SignerImpl<CryptoPP::TF_SignatureSchemeOptions<CryptoPP::TF_SS<
CryptoPP::PKCS1v15, 
   CryptoPP::SHA, CryptoPP::RSA, int>, CryptoPP::RSA, 
   CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA> >] 

<<attachment: winmail.dat>>

Reply via email to