blob: a180ec374a2d18397f4b29ab47070685b1475088 [file] [log] [blame]
Jean-Paul Calderone897bc252008-02-18 20:50:23 -05001<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4<title>3.1.5 PKey objects </title>
5<META NAME="description" CONTENT="3.1.5 PKey objects ">
6<META NAME="keywords" CONTENT="pyOpenSSL">
7<META NAME="resource-type" CONTENT="document">
8<META NAME="distribution" CONTENT="global">
9<link rel="STYLESHEET" href="pyOpenSSL.css">
10<LINK REL="next" href="openssl-pkcs7.html">
11<LINK REL="previous" href="openssl-x509store.html">
12<LINK REL="up" href="openssl-crypto.html">
13<LINK REL="next" href="openssl-pkcs7.html">
14</head>
15<body>
16<DIV CLASS="navigation">
17<table align="center" width="100%" cellpadding="0" cellspacing="2">
18<tr>
19<td><A href="openssl-x509store.html"><img src="previous.gif"
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -050020 border="0" height="32"
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050021 alt="Previous Page" width="32"></A></td>
22<td><A href="openssl-crypto.html"><img src="up.gif"
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -050023 border="0" height="32"
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050024 alt="Up One Level" width="32"></A></td>
25<td><A href="openssl-pkcs7.html"><img src="next.gif"
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -050026 border="0" height="32"
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050027 alt="Next Page" width="32"></A></td>
28<td align="center" width="100%">Python OpenSSL Manual</td>
29<td><A href="contents.html"><img src="contents.gif"
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -050030 border="0" height="32"
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050031 alt="Contents" width="32"></A></td>
32<td><img src="blank.gif"
33 border="0" height="32"
34 alt="" width="32"></td>
35<td><img src="blank.gif"
36 border="0" height="32"
37 alt="" width="32"></td>
38</tr></table>
39<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-x509store.html">3.1.4 X509Store objects</A>
40<b class="navlabel">Up:</b> <a class="sectref" href="openssl-crypto.html">3.1 crypto </A>
41<b class="navlabel">Next:</b> <a class="sectref" href="openssl-pkcs7.html">3.1.6 PKCS7 objects</A>
42<br><hr>
43</DIV>
44<!--End of Navigation Panel-->
45
46<H3><A NAME="SECTION000415000000000000000">&nbsp;</A>
47<BR>
483.1.5 PKey objects
49</H3>
Jean-Paul Calderone2aa2b332008-03-06 21:43:14 -050050
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050051<P>
Jean-Paul Calderone2aa2b332008-03-06 21:43:14 -050052The PKey object has the following methods:
53
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050054<P>
Jean-Paul Calderone6c1d4f92009-03-07 09:10:30 -050055<dl><dt><b><a name='l2h-73'><tt class='method'>bits</tt></a></b>()
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050056<dd>
57Return the number of bits of the key.
58</dl>
Jean-Paul Calderone2aa2b332008-03-06 21:43:14 -050059
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050060<P>
Jean-Paul Calderone6c1d4f92009-03-07 09:10:30 -050061<dl><dt><b><a name='l2h-74'><tt class='method'>generate_key</tt></a></b>(<var>type, bits</var>)
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050062<dd>
63Generate a public/private key pair of the type <var>type</var> (one of
64<tt class="constant">TYPE_RSA</tt> and <tt class="constant">TYPE_DSA</tt>) with the size <var>bits</var>.
65</dl>
Jean-Paul Calderone2aa2b332008-03-06 21:43:14 -050066
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050067<P>
Jean-Paul Calderone6c1d4f92009-03-07 09:10:30 -050068<dl><dt><b><a name='l2h-75'><tt class='method'>type</tt></a></b>()
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050069<dd>
70Return the type of the key.
71</dl>
Jean-Paul Calderone2aa2b332008-03-06 21:43:14 -050072
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050073<P>
74
75<DIV CLASS="navigation">
76<p><hr>
77<table align="center" width="100%" cellpadding="0" cellspacing="2">
78<tr>
79<td><A href="openssl-x509store.html"><img src="previous.gif"
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -050080 border="0" height="32"
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050081 alt="Previous Page" width="32"></A></td>
82<td><A href="openssl-crypto.html"><img src="up.gif"
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -050083 border="0" height="32"
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050084 alt="Up One Level" width="32"></A></td>
85<td><A href="openssl-pkcs7.html"><img src="next.gif"
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -050086 border="0" height="32"
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050087 alt="Next Page" width="32"></A></td>
88<td align="center" width="100%">Python OpenSSL Manual</td>
89<td><A href="contents.html"><img src="contents.gif"
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -050090 border="0" height="32"
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050091 alt="Contents" width="32"></A></td>
92<td><img src="blank.gif"
93 border="0" height="32"
94 alt="" width="32"></td>
95<td><img src="blank.gif"
96 border="0" height="32"
97 alt="" width="32"></td>
98</tr></table>
99<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-x509store.html">3.1.4 X509Store objects</A>
100<b class="navlabel">Up:</b> <a class="sectref" href="openssl-crypto.html">3.1 crypto </A>
101<b class="navlabel">Next:</b> <a class="sectref" href="openssl-pkcs7.html">3.1.6 PKCS7 objects</A>
102<hr>
Jean-Paul Calderone215d51b2009-11-13 09:19:21 -0500103<span class="release-info">Release 0.10.</span>
Jean-Paul Calderone897bc252008-02-18 20:50:23 -0500104</DIV>
105<!--End of Navigation Panel-->
106
107</BODY>
108</HTML>