So, I've been testing out the latest version of Crypto++ for the past
few days and got really happy once I noticed that all the problems I
had had previously had now gone away.

However, today I stumbled across a problem. I'm generating a pair of
1024 bit RSA keys and am exporting the public part to a string. It's
not a problem in Crypto++ per se, as the key is correctly exported.
However, the std::string holding the encoded key is broken somehow.

Here is the code I'm using to reproduce the error:

AutoSeededRandomPool rnd;

RSAES_OAEP_SHA_Decryptor privateKey(rnd, 1024);
RSAES_OAEP_SHA_Encryptor publicKey(privateKey);

// Once pubEncoded goes out of scope, VS2005 throws a debug assertion:
// _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
// in dbgdel.cpp, line 52
{
        string pubEncoded;
        HexEncoder pubFile(new StringSink(pubEncoded));
        publicKey.DEREncode(pubFile);
        pubFile.MessageEnd();
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Crypto++ 
Users" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cryptopp-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to