File: qsslkey.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (41 lines) | stat: -rw-r--r-- 8,774 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QSslKey Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSslKey Class Reference<br /><sup><sup>[<a href="qtnetwork.html">QtNetwork</a> module]</sup></sup></h1><p>The QSslKey class provides an interface for private and public keys. <a href="#details">More...</a></p>
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsslkey.html#QSslKey">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsslkey.html#QSslKey-2">__init__</a></b> (<i>self</i>, QByteArray, QSsl.KeyAlgorithm, QSsl.EncodingFormat&#160;<i>encoding</i>&#160;=&#160;QSsl.Pem, QSsl.KeyType&#160;<i>type</i>&#160;=&#160;QSsl.PrivateKey, QByteArray&#160;<i>passPhrase</i>&#160;=&#160;QByteArray())</li><li><div class="fn" /><b><a href="qsslkey.html#QSslKey-3">__init__</a></b> (<i>self</i>, QIODevice, QSsl.KeyAlgorithm, QSsl.EncodingFormat&#160;<i>encoding</i>&#160;=&#160;QSsl.Pem, QSsl.KeyType&#160;<i>type</i>&#160;=&#160;QSsl.PrivateKey, QByteArray&#160;<i>passPhrase</i>&#160;=&#160;QByteArray())</li><li><div class="fn" /><b><a href="qsslkey.html#QSslKey-4">__init__</a></b> (<i>self</i>, QSslKey)</li><li><div class="fn" />QSsl.KeyAlgorithm <b><a href="qsslkey.html#algorithm">algorithm</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsslkey.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsslkey.html#handle">handle</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsslkey.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsslkey.html#length">length</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qsslkey.html#toDer">toDer</a></b> (<i>self</i>, QByteArray&#160;<i>passPhrase</i>&#160;=&#160;QByteArray())</li><li><div class="fn" />QByteArray <b><a href="qsslkey.html#toPem">toPem</a></b> (<i>self</i>, QByteArray&#160;<i>passPhrase</i>&#160;=&#160;QByteArray())</li><li><div class="fn" />QSsl.KeyType <b><a href="qsslkey.html#type">type</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qsslkey.html#__eq__">__eq__</a></b> (<i>self</i>, QSslKey)</li><li><div class="fn" />bool <b><a href="qsslkey.html#__ne__">__ne__</a></b> (<i>self</i>, QSslKey)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSslKey class provides an interface for private and public keys.</p>
<p>QSslKey provides a simple API for managing keys.</p>
<p>See also <a href="qsslsocket.html">QSslSocket</a>, <a href="qsslcertificate.html">QSslCertificate</a>, and <a href="qsslcipher.html">QSslCipher</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSslKey" />QSslKey.__init__ (<i>self</i>)</h3><p>Constructs a null key.</p>
<p>See also <a href="qsslkey.html#isNull">isNull</a>().</p>
<h3 class="fn"><a name="QSslKey-2" />QSslKey.__init__ (<i>self</i>, <a href="qbytearray.html">QByteArray</a>, <a href="qssl.html#KeyAlgorithm-enum">QSsl.KeyAlgorithm</a>, <a href="qssl.html#EncodingFormat-enum">QSsl.EncodingFormat</a>&#160;<i>encoding</i>&#160;=&#160;QSsl.Pem, <a href="qssl.html#KeyType-enum">QSsl.KeyType</a>&#160;<i>type</i>&#160;=&#160;QSsl.PrivateKey, <a href="qbytearray.html">QByteArray</a>&#160;<i>passPhrase</i>&#160;=&#160;QByteArray())</h3><p>Constructs a <a href="qsslkey.html">QSslKey</a> by decoding the string in the byte array <i>encoded</i> using a specified <i>algorithm</i> and <i>encoding</i> format. If the encoded key is encrypted, <i>passPhrase</i> is used to decrypt it. <i>type</i> specifies whether the key is public or private.</p>
<p>After construction, use <a href="qsslkey.html#isNull">isNull</a>() to check if <i>encoded</i> contained a valid key.</p>
<h3 class="fn"><a name="QSslKey-3" />QSslKey.__init__ (<i>self</i>, <a href="qiodevice.html">QIODevice</a>, <a href="qssl.html#KeyAlgorithm-enum">QSsl.KeyAlgorithm</a>, <a href="qssl.html#EncodingFormat-enum">QSsl.EncodingFormat</a>&#160;<i>encoding</i>&#160;=&#160;QSsl.Pem, <a href="qssl.html#KeyType-enum">QSsl.KeyType</a>&#160;<i>type</i>&#160;=&#160;QSsl.PrivateKey, <a href="qbytearray.html">QByteArray</a>&#160;<i>passPhrase</i>&#160;=&#160;QByteArray())</h3><p>Constructs a <a href="qsslkey.html">QSslKey</a> by reading and decoding data from a <i>device</i> using a specified <i>algorithm</i> and <i>encoding</i> format. If the encoded key is encrypted, <i>passPhrase</i> is used to decrypt it. <i>type</i> specifies whether the key is public or private.</p>
<p>After construction, use <a href="qsslkey.html#isNull">isNull</a>() to check if <i>device</i> provided a valid key.</p>
<h3 class="fn"><a name="QSslKey-4" />QSslKey.__init__ (<i>self</i>, <a href="qsslkey.html">QSslKey</a>)</h3><p>Constructs an identical copy of <i>other</i>.</p>
<a name="//apple_ref/cpp/instm/QSslKey/~QSslKey" />
<h3 class="fn"><a name="algorithm" /><a href="qssl.html#KeyAlgorithm-enum">QSsl.KeyAlgorithm</a> QSslKey.algorithm (<i>self</i>)</h3><p>Returns the key algorithm.</p>
<a name="//apple_ref/cpp/instm/QSslKey/clear" />
<h3 class="fn"><a name="clear" />QSslKey.clear (<i>self</i>)</h3><p>Clears the contents of this key, making it a null key.</p>
<p>See also <a href="qsslkey.html#isNull">isNull</a>().</p>
<a name="//apple_ref/cpp/instm/QSslKey/handle" />
<h3 class="fn"><a name="handle" />int QSslKey.handle (<i>self</i>)</h3><p>Returns a pointer to the native key handle, if it is available; otherwise a null pointer is returned.</p>
<p>You can use this handle together with the native API to access extended information about the key.</p>
<p><b>Warning:</b> Use of this function has a high probability of being non-portable, and its return value may vary across platforms, and between minor Qt releases.</p>
<a name="//apple_ref/cpp/instm/QSslKey/isNull" />
<h3 class="fn"><a name="isNull" />bool QSslKey.isNull (<i>self</i>)</h3><p>Returns true if this is a null key; otherwise false.</p>
<p>See also <a href="qsslkey.html#clear">clear</a>().</p>
<a name="//apple_ref/cpp/instm/QSslKey/length" />
<h3 class="fn"><a name="length" />int QSslKey.length (<i>self</i>)</h3><p>Returns the length of the key in bits, or -1 if the key is null.</p>
<a name="//apple_ref/cpp/instm/QSslKey/toDer" />
<h3 class="fn"><a name="toDer" /><a href="qbytearray.html">QByteArray</a> QSslKey.toDer (<i>self</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>passPhrase</i>&#160;=&#160;QByteArray())</h3><p>Returns the key in DER encoding. The result is encrypted with <i>passPhrase</i> if the key is a private key and <i>passPhrase</i> is non-empty.</p>
<a name="//apple_ref/cpp/instm/QSslKey/toPem" />
<h3 class="fn"><a name="toPem" /><a href="qbytearray.html">QByteArray</a> QSslKey.toPem (<i>self</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>passPhrase</i>&#160;=&#160;QByteArray())</h3><p>Returns the key in PEM encoding. The result is encrypted with <i>passPhrase</i> if the key is a private key and <i>passPhrase</i> is non-empty.</p>
<a name="//apple_ref/cpp/instm/QSslKey/type" />
<h3 class="fn"><a name="type" /><a href="qssl.html#KeyType-enum">QSsl.KeyType</a> QSslKey.type (<i>self</i>)</h3><p>Returns the type of the key (i.e., PublicKey or PrivateKey).</p>
<a name="//apple_ref/cpp/instm/QSslKey/operator!=" />
<h3 class="fn"><a name="__eq__" />bool QSslKey.__eq__ (<i>self</i>, <a href="qsslkey.html">QSslKey</a>)</h3><h3 class="fn"><a name="__ne__" />bool QSslKey.__ne__ (<i>self</i>, <a href="qsslkey.html">QSslKey</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>