[Botan-devel] RSA Public Key

Jack Lloyd lloyd at randombit.net
Thu Jun 30 11:08:31 EDT 2005


Using static allocation:

RSA_PrivateKey priv_key(1024);
RSA_PublicKey pub_key = priv_key;
  // Some compilers miscompile this code (known to include Borland C++
  // and some versions of Intel C++)

Using dynamic allocation:

RSA_PrivateKey* priv_key = new RSA_PrivateKey(1024);
RSA_PublicKey* pub_key = X509::copy_key(priv_key);

-Jack

On Thu, Jun 30, 2005 at 05:04:14PM +0200, Ruben Quintero Lores wrote:
> How can obtain a RSA_PublicKey from a RSA_PrivateKey??
> 
> If I call  aprivatekey=new RSA_PrivateKey(len) how can I call the
> RSA_PublicKey constructor to obtain a RSA public key??
> 
> Thank you,
> 
> Rub??n
> 
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel



More information about the botan-devel mailing list