[Qt-interest] RSA Key gen using openssl in Qt
Sean Harmer
sean.harmer at maps-technology.com
Fri Jan 21 10:54:51 CET 2011
Hi,
On Friday 21 January 2011 09:42:28 Plato P.B. wrote:
> I need to do a "openssl genrsa 1024" in Qt? how can i do that? i don't want
> to use system calls! can somebody help me?
You can use QCA to do this. Install qca and the qca-ossl plugin (and openssl
of course). Once you have verified this works take a look at the examples and
you will find one called rsatest which shows you exactly how to do this. A
link to this example is:
http://websvn.kde.org/trunk/kdesupport/qca/examples/rsatest/rsatest.cpp?view=markup
The basic steps are these:
QCA::PrivateKey seckey = QCA::KeyGenerator().createRSA(1024);
QCA::PublicKey pubkey = seckey.toPublicKey();
HTH,
Sean
More information about the Qt-interest-old
mailing list