Wow. Thanks for all of the replies.
Shortly before leaving work I did realize that a chunk of numbers in
the middle actually were changing.
My mistake.
There were a lot of numbers up front (like 20 or 30) and the last 4 or
so that were never changing. I should have looked closer.
On Dec 5, 4:38 pm, "eric.frederich" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm trying to get an example working.
> I copied the GenerateRSAKey function from test.cpp and put it in my
> own file with a main.
> It keeps generating the same exact public key.
> I tried changing the const char *seed and even changed the RandomPool
> to an AutoSeededRandomPool but still no luck.
>
> Any help is appreciated.
> Below is the entire file.
>
> Thanks,
> ~Eric
>
> #include "dll.h"
>
> #include <iostream>
> #include <time.h>
>
> USING_NAMESPACE(CryptoPP)
> USING_NAMESPACE(std)
>
> int main(int argc, char* argv[]){
> cout << "inside main" << endl;
>
> unsigned int keyLength = 128;
>
> const char *privFilename = "myPrivateKey";
> const char *pubFilename = "myPublicKey";
> const char *seed = "Does this string do anything?";
>
> AutoSeededRandomPool randPool;
> randPool.IncorporateEntropy((byte *)seed, strlen(seed));
>
> RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength);
> HexEncoder privFile(new FileSink(privFilename));
> priv.DEREncode(privFile);
> privFile.MessageEnd();
>
> RSAES_OAEP_SHA_Encryptor pub(priv);
> HexEncoder pubFile(new FileSink(pubFilename));
> pub.DEREncode(pubFile);
> pubFile.MessageEnd();
> return 0;
>
> }
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---