Hi,

i am trying to sign a message using the code below.

void wxCryptopp::SignMessage( const std::string& PrivateKeyFileName,
                             const std::string& Message,
                             std::string& SignedMessage )
{
    try
    {
        SignedMessage = "";

        CryptoPP::FileSource privFile( PrivateKeyFileName.c_str(), true, 
new CryptoPP::HexDecoder);
        CryptoPP::RSASSA_PKCS1v15_SHA_Signer priv(privFile);

        CryptoPP::AutoSeededRandomPool rng;
        size_t length = priv.MaxSignatureLength();
        wxMessageBox(wxString::Format("Signer Length : %d", length));

        CryptoPP::StringSink* strSink = new CryptoPP::StringSink( 
SignedMessage );
        CryptoPP::HexEncoder* hexEnc = new CryptoPP::HexEncoder(strSink);
        CryptoPP::SignerFilter* signer = new CryptoPP::SignerFilter( rng, 
priv, hexEnc, true);

        CryptoPP::StringSource s1(Message, true, signer);
    }
    catch (CryptoPP::Exception e)
    {
        wxMessageBox(e.GetWhat(), "Exception");
    }
}

The app compiles ok but when i try to sign the message it fails at this 
line:


   - CryptoPP::StringSource s1(Message, true, signer);

There is no exception thrown.

I am using codeblocks and wxwidgets in winxp 32bit. I compiled the cryptopp 
static library using mingw. Mingw is the compiler that i am using.


Thank you in advance.

-- 
-- 
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.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to