I found the solution

void PrintPublicKey( const RSA::PublicKey& key )
{
    cout << "n: " << key.GetModulus() << endl;
    cout << "e: " << key.GetPublicExponent() << endl;
}

void PrintPrivateKey( const RSA::PrivateKey& key )
{
    cout << "n: " << key.GetModulus() << endl;

    cout << "d: " << key.GetPrivateExponent() << endl;
    cout << "e: " << key.GetPublicExponent() << endl;

    cout << "p: " << key.GetPrime1() << endl;
    cout << "q: " << key.GetPrime2() << endl;
}

-- 
You received this message because you are subscribed to "Crypto++ Users". More 
information about Crypto++ and this group is available at 
http://www.cryptopp.com and 
http://groups.google.com/forum/#!forum/cryptopp-users.
--- 
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 cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to