hi i am using the Crypto++ library in my  code. I have written a code
which  generates a public key as well as private key and then it
stores it as text files, but i would it to store not as files but they
should be stored in a buffer. Here' s my key generation code. Any help
in this regard would be greatly appreciated.

void ClCrypto::GenerateKeys(const char *PCpubFilename, const char
*PCprivFilename, unsigned int UIkeyLength)
{
    RandomPool randPool;
    randPool.Put((byte *)PCseed, strlen(PCseed));

    RSAES_OAEP_SHA_Decryptor priv(randPool, UIkeyLength);
    HexEncoder privFile(new FileSink(privFilename));
    priv.DEREncode(privFile);
    privFile.MessageEnd();

    RSAES_OAEP_SHA_Encryptor pub(priv);
    HexEncoder pubFile(new FileSink(PCpubFilename));
    pub.DEREncode(pubFile);
    pubFile.MessageEnd();
}


--~--~---------~--~----~------------~-------~--~----~
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