On Fri, Sep 23, 2011 at 12:13, Earnol <[email protected]> wrote:
> Thank you for your answer:
> T is CryptoPP::RSA::PublicKey
>
You might want to double-check that. If you're calling DEREncode() on
something that inherits X509PublicKey, you should see the full
SubjectPublicKeyInfo sequence.

Try something like this:

AutoSeededRandomPool rng;
// generate a new keypair
RSASS<PKCS1v15, SHA256>::Signer signer(rng,numbits);
// save the DER-encoded public key
RSASS<PKCS1v15,SHA256>::Verifier verifier(signer);
string pubfile = parsedopts["pubout"].as<string>();
FileSink pubfs(pubfile.c_str());
verifier.DEREncode(pubfs);


Geoff

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