aboutsummaryrefslogtreecommitdiff
path: root/docs/paramiko.rsakey-pysrc.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/paramiko.rsakey-pysrc.html')
-rw-r--r--docs/paramiko.rsakey-pysrc.html162
1 files changed, 71 insertions, 91 deletions
diff --git a/docs/paramiko.rsakey-pysrc.html b/docs/paramiko.rsakey-pysrc.html
index d1dd96a..8deccb5 100644
--- a/docs/paramiko.rsakey-pysrc.html
+++ b/docs/paramiko.rsakey-pysrc.html
@@ -197,98 +197,78 @@ paramiko.RSAKey.get_name" class="py-name" href="#" onclick="return doclink('link
<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"><tt class="py-docstring"> @return: new private key</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: L{RSAKey}</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
-<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt id="link-50" class="py-name" targets="Variable paramiko.auth_handler.randpool=paramiko.auth_handler-module.html#randpool,Variable paramiko.channel.randpool=paramiko.channel-module.html#randpool,Variable paramiko.client.randpool=paramiko.client-module.html#randpool,Variable paramiko.common.randpool=paramiko.common-module.html#randpool,Variable paramiko.dsskey.randpool=paramiko.dsskey-module.html#randpool,Variable paramiko.hostkeys.randpool=paramiko.hostkeys-module.html#randpool,Variable paramiko.kex_gex.randpool=paramiko.kex_gex-module.html#randpool,Variable paramiko.kex_group1.randpool=paramiko.kex_group1-module.html#randpool,Variable paramiko.packet.randpool=paramiko.packet-module.html#randpool,Variable paramiko.pkey.randpool=paramiko.pkey-module.html#randpool,Variable paramiko.rsakey.randpool=paramiko.rsakey-module.html#randpool,Variable paramiko.server.randpool=paramiko.server-module.html#randpool,Variable paramiko.sftp.randpool=paramiko.sftp-module.html#randpool,Variable paramiko.sftp_attr.randpool=paramiko.sftp_attr-module.html#randpool,Variable paramiko.sftp_client.randpool=paramiko.sftp_client-module.html#randpool,Variable paramiko.sftp_file.randpool=paramiko.sftp_file-module.html#randpool,Variable paramiko.sftp_handle.randpool=paramiko.sftp_handle-module.html#randpool,Variable paramiko.sftp_server.randpool=paramiko.sftp_server-module.html#randpool,Variable paramiko.sftp_si.randpool=paramiko.sftp_si-module.html#randpool,Variable paramiko.transport.randpool=paramiko.transport-module.html#randpool,Variable paramiko.util.randpool=paramiko.util-module.html#randpool"><a title="paramiko.auth_handler.randpool
-paramiko.channel.randpool
-paramiko.client.randpool
-paramiko.common.randpool
-paramiko.dsskey.randpool
-paramiko.hostkeys.randpool
-paramiko.kex_gex.randpool
-paramiko.kex_group1.randpool
-paramiko.packet.randpool
-paramiko.pkey.randpool
-paramiko.rsakey.randpool
-paramiko.server.randpool
-paramiko.sftp.randpool
-paramiko.sftp_attr.randpool
-paramiko.sftp_client.randpool
-paramiko.sftp_file.randpool
-paramiko.sftp_handle.randpool
-paramiko.sftp_server.randpool
-paramiko.sftp_si.randpool
-paramiko.transport.randpool
-paramiko.util.randpool" class="py-name" href="#" onclick="return doclink('link-50', 'randpool', 'link-50');">randpool</a></tt><tt class="py-op">.</tt><tt id="link-51" class="py-name" targets="Method paramiko.rng.StrongLockingRandomPool.stir()=paramiko.rng.StrongLockingRandomPool-class.html#stir"><a title="paramiko.rng.StrongLockingRandomPool.stir" class="py-name" href="#" onclick="return doclink('link-51', 'stir', 'link-51');">stir</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-name">rsa</tt> <tt class="py-op">=</tt> <tt class="py-name">RSA</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name" targets="Static Method paramiko.DSSKey.generate()=paramiko.DSSKey-class.html#generate,Static Method paramiko.RSAKey.generate()=paramiko.RSAKey-class.html#generate"><a title="paramiko.DSSKey.generate
-paramiko.RSAKey.generate" class="py-name" href="#" onclick="return doclink('link-52', 'generate', 'link-52');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">bits</tt><tt class="py-op">,</tt> <tt id="link-53" class="py-name"><a title="paramiko.auth_handler.randpool
-paramiko.channel.randpool
-paramiko.client.randpool
-paramiko.common.randpool
-paramiko.dsskey.randpool
-paramiko.hostkeys.randpool
-paramiko.kex_gex.randpool
-paramiko.kex_group1.randpool
-paramiko.packet.randpool
-paramiko.pkey.randpool
-paramiko.rsakey.randpool
-paramiko.server.randpool
-paramiko.sftp.randpool
-paramiko.sftp_attr.randpool
-paramiko.sftp_client.randpool
-paramiko.sftp_file.randpool
-paramiko.sftp_handle.randpool
-paramiko.sftp_server.randpool
-paramiko.sftp_si.randpool
-paramiko.transport.randpool
-paramiko.util.randpool" class="py-name" href="#" onclick="return doclink('link-53', 'randpool', 'link-50');">randpool</a></tt><tt class="py-op">.</tt><tt id="link-54" class="py-name" targets="Method paramiko.Message.get_bytes()=paramiko.Message-class.html#get_bytes,Method paramiko.rng.StrongLockingRandomPool.get_bytes()=paramiko.rng.StrongLockingRandomPool-class.html#get_bytes"><a title="paramiko.Message.get_bytes
-paramiko.rng.StrongLockingRandomPool.get_bytes" class="py-name" href="#" onclick="return doclink('link-54', 'get_bytes', 'link-54');">get_bytes</a></tt><tt class="py-op">,</tt> <tt class="py-name">progress_func</tt><tt class="py-op">)</tt> </tt>
-<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt id="link-55" class="py-name" targets="Class paramiko.RSAKey=paramiko.RSAKey-class.html"><a title="paramiko.RSAKey" class="py-name" href="#" onclick="return doclink('link-55', 'RSAKey', 'link-55');">RSAKey</a></tt><tt class="py-op">(</tt><tt class="py-name">vals</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">n</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">d</tt> </tt>
-<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">p</tt> </tt>
-<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">q</tt> </tt>
-<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">key</tt> </tt>
-</div><a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt id="link-56" class="py-name"><a title="paramiko.DSSKey.generate
-paramiko.RSAKey.generate" class="py-name" href="#" onclick="return doclink('link-56', 'generate', 'link-52');">generate</a></tt> <tt class="py-op">=</tt> <tt class="py-name">staticmethod</tt><tt class="py-op">(</tt><tt id="link-57" class="py-name"><a title="paramiko.DSSKey.generate
-paramiko.RSAKey.generate" class="py-name" href="#" onclick="return doclink('link-57', 'generate', 'link-52');">generate</a></tt><tt class="py-op">)</tt> </tt>
+<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt class="py-name">rsa</tt> <tt class="py-op">=</tt> <tt class="py-name">RSA</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name" targets="Static Method paramiko.DSSKey.generate()=paramiko.DSSKey-class.html#generate,Static Method paramiko.RSAKey.generate()=paramiko.RSAKey-class.html#generate"><a title="paramiko.DSSKey.generate
+paramiko.RSAKey.generate" class="py-name" href="#" onclick="return doclink('link-50', 'generate', 'link-50');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">bits</tt><tt class="py-op">,</tt> <tt id="link-51" class="py-name" targets="Variable paramiko.auth_handler.rng=paramiko.auth_handler-module.html#rng,Variable paramiko.channel.rng=paramiko.channel-module.html#rng,Variable paramiko.client.rng=paramiko.client-module.html#rng,Variable paramiko.common.rng=paramiko.common-module.html#rng,Variable paramiko.dsskey.rng=paramiko.dsskey-module.html#rng,Variable paramiko.hostkeys.rng=paramiko.hostkeys-module.html#rng,Variable paramiko.kex_gex.rng=paramiko.kex_gex-module.html#rng,Variable paramiko.kex_group1.rng=paramiko.kex_group1-module.html#rng,Variable paramiko.packet.rng=paramiko.packet-module.html#rng,Variable paramiko.pkey.rng=paramiko.pkey-module.html#rng,Variable paramiko.rsakey.rng=paramiko.rsakey-module.html#rng,Variable paramiko.server.rng=paramiko.server-module.html#rng,Variable paramiko.sftp.rng=paramiko.sftp-module.html#rng,Variable paramiko.sftp_attr.rng=paramiko.sftp_attr-module.html#rng,Variable paramiko.sftp_client.rng=paramiko.sftp_client-module.html#rng,Variable paramiko.sftp_file.rng=paramiko.sftp_file-module.html#rng,Variable paramiko.sftp_handle.rng=paramiko.sftp_handle-module.html#rng,Variable paramiko.sftp_server.rng=paramiko.sftp_server-module.html#rng,Variable paramiko.sftp_si.rng=paramiko.sftp_si-module.html#rng,Variable paramiko.transport.rng=paramiko.transport-module.html#rng,Variable paramiko.util.rng=paramiko.util-module.html#rng"><a title="paramiko.auth_handler.rng
+paramiko.channel.rng
+paramiko.client.rng
+paramiko.common.rng
+paramiko.dsskey.rng
+paramiko.hostkeys.rng
+paramiko.kex_gex.rng
+paramiko.kex_group1.rng
+paramiko.packet.rng
+paramiko.pkey.rng
+paramiko.rsakey.rng
+paramiko.server.rng
+paramiko.sftp.rng
+paramiko.sftp_attr.rng
+paramiko.sftp_client.rng
+paramiko.sftp_file.rng
+paramiko.sftp_handle.rng
+paramiko.sftp_server.rng
+paramiko.sftp_si.rng
+paramiko.transport.rng
+paramiko.util.rng" class="py-name" href="#" onclick="return doclink('link-51', 'rng', 'link-51');">rng</a></tt><tt class="py-op">.</tt><tt id="link-52" class="py-name" targets="Method paramiko.BufferedFile.read()=paramiko.BufferedFile-class.html#read,Method paramiko.SFTPHandle.read()=paramiko.SFTPHandle-class.html#read,Method paramiko.buffered_pipe.BufferedPipe.read()=paramiko.buffered_pipe.BufferedPipe-class.html#read"><a title="paramiko.BufferedFile.read
+paramiko.SFTPHandle.read
+paramiko.buffered_pipe.BufferedPipe.read" class="py-name" href="#" onclick="return doclink('link-52', 'read', 'link-52');">read</a></tt><tt class="py-op">,</tt> <tt class="py-name">progress_func</tt><tt class="py-op">)</tt> </tt>
+<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt id="link-53" class="py-name" targets="Class paramiko.RSAKey=paramiko.RSAKey-class.html"><a title="paramiko.RSAKey" class="py-name" href="#" onclick="return doclink('link-53', 'RSAKey', 'link-53');">RSAKey</a></tt><tt class="py-op">(</tt><tt class="py-name">vals</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">n</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">d</tt> </tt>
+<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">p</tt> </tt>
+<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-name">rsa</tt><tt class="py-op">.</tt><tt class="py-name">q</tt> </tt>
+<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">key</tt> </tt>
+</div><a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt id="link-54" class="py-name"><a title="paramiko.DSSKey.generate
+paramiko.RSAKey.generate" class="py-name" href="#" onclick="return doclink('link-54', 'generate', 'link-50');">generate</a></tt> <tt class="py-op">=</tt> <tt class="py-name">staticmethod</tt><tt class="py-op">(</tt><tt id="link-55" class="py-name"><a title="paramiko.DSSKey.generate
+paramiko.RSAKey.generate" class="py-name" href="#" onclick="return doclink('link-55', 'generate', 'link-50');">generate</a></tt><tt class="py-op">)</tt> </tt>
+<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> </tt>
-<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> </tt>
-<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> <tt class="py-comment">### internals...</tt> </tt>
+<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-comment">### internals...</tt> </tt>
+<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> </tt>
-<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> </tt>
-<a name="RSAKey._pkcs1imify"></a><div id="RSAKey._pkcs1imify-def"><a name="L153"></a><tt class="py-lineno">153</tt> <a class="py-toggle" href="#" id="RSAKey._pkcs1imify-toggle" onclick="return toggle('RSAKey._pkcs1imify');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.rsakey.RSAKey-class.html#_pkcs1imify">_pkcs1imify</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="RSAKey._pkcs1imify-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RSAKey._pkcs1imify-expanded"><a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
-<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"><tt class="py-docstring"> turn a 20-byte SHA1 hash into a blob of data as large as the key's N,</tt> </tt>
-<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"><tt class="py-docstring"> using PKCS1's \"emsa-pkcs1-v1_5\" encoding. totally bizarre.</tt> </tt>
-<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
-<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-name">SHA1_DIGESTINFO</tt> <tt class="py-op">=</tt> <tt class="py-string">'\x30\x21\x30\x09\x06\x05\x2b\x0e\x03\x02\x1a\x05\x00\x04\x14'</tt> </tt>
-<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-58" class="py-name"><a title="paramiko.util" class="py-name" href="#" onclick="return doclink('link-58', 'util', 'link-3');">util</a></tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="paramiko.util.deflate_long" class="py-name" href="#" onclick="return doclink('link-59', 'deflate_long', 'link-32');">deflate_long</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-name">filler</tt> <tt class="py-op">=</tt> <tt class="py-string">'\xff'</tt> <tt class="py-op">*</tt> <tt class="py-op">(</tt><tt class="py-name">size</tt> <tt class="py-op">-</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">SHA1_DIGESTINFO</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
-<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'\x00\x01'</tt> <tt class="py-op">+</tt> <tt class="py-name">filler</tt> <tt class="py-op">+</tt> <tt class="py-string">'\x00'</tt> <tt class="py-op">+</tt> <tt class="py-name">SHA1_DIGESTINFO</tt> <tt class="py-op">+</tt> <tt class="py-name">data</tt> </tt>
-</div><a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> </tt>
-<a name="RSAKey._from_private_key_file"></a><div id="RSAKey._from_private_key_file-def"><a name="L163"></a><tt class="py-lineno">163</tt> <a class="py-toggle" href="#" id="RSAKey._from_private_key_file-toggle" onclick="return toggle('RSAKey._from_private_key_file');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.rsakey.RSAKey-class.html#_from_private_key_file">_from_private_key_file</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">password</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="RSAKey._from_private_key_file-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RSAKey._from_private_key_file-expanded"><a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_private_key_file</tt><tt class="py-op">(</tt><tt class="py-string">'RSA'</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
-<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_decode_key</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> </tt>
-<a name="RSAKey._from_private_key"></a><div id="RSAKey._from_private_key-def"><a name="L167"></a><tt class="py-lineno">167</tt> <a class="py-toggle" href="#" id="RSAKey._from_private_key-toggle" onclick="return toggle('RSAKey._from_private_key');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.rsakey.RSAKey-class.html#_from_private_key">_from_private_key</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">file_obj</tt><tt class="py-op">,</tt> <tt class="py-param">password</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="RSAKey._from_private_key-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RSAKey._from_private_key-expanded"><a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_private_key</tt><tt class="py-op">(</tt><tt class="py-string">'RSA'</tt><tt class="py-op">,</tt> <tt class="py-name">file_obj</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
-<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_decode_key</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> </tt>
-<a name="RSAKey._decode_key"></a><div id="RSAKey._decode_key-def"><a name="L171"></a><tt class="py-lineno">171</tt> <a class="py-toggle" href="#" id="RSAKey._decode_key-toggle" onclick="return toggle('RSAKey._decode_key');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.rsakey.RSAKey-class.html#_decode_key">_decode_key</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="RSAKey._decode_key-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RSAKey._decode_key-expanded"><a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt class="py-comment"># private key file contains:</tt> </tt>
-<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-comment"># RSAPrivateKey = { version = 0, n, e, d, p, q, d mod p-1, d mod q-1, q**-1 mod p }</tt> </tt>
-<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-name">keylist</tt> <tt class="py-op">=</tt> <tt id="link-60" class="py-name"><a title="paramiko.ber.BER" class="py-name" href="#" onclick="return doclink('link-60', 'BER', 'link-9');">BER</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name" targets="Method paramiko.ber.BER.decode()=paramiko.ber.BER-class.html#decode"><a title="paramiko.ber.BER.decode" class="py-name" href="#" onclick="return doclink('link-61', 'decode', 'link-61');">decode</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt id="link-62" class="py-name"><a title="paramiko.ber.BERException" class="py-name" href="#" onclick="return doclink('link-62', 'BERException', 'link-10');">BERException</a></tt><tt class="py-op">:</tt> </tt>
-<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-63" class="py-name"><a title="paramiko.SSHException" class="py-name" href="#" onclick="return doclink('link-63', 'SSHException', 'link-16');">SSHException</a></tt><tt class="py-op">(</tt><tt class="py-string">'Unable to parse key file'</tt><tt class="py-op">)</tt> </tt>
-<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">keylist</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">keylist</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-64" class="py-name"><a title="paramiko.SSHException" class="py-name" href="#" onclick="return doclink('link-64', 'SSHException', 'link-16');">SSHException</a></tt><tt class="py-op">(</tt><tt class="py-string">'Not a valid RSA private key file (bad ber encoding)'</tt><tt class="py-op">)</tt> </tt>
-<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
-<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> </tt>
-<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
-<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-comment"># not really needed</tt> </tt>
-<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> </tt>
-<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> </tt>
-<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt id="link-65" class="py-name"><a title="paramiko.util" class="py-name" href="#" onclick="return doclink('link-65', 'util', 'link-3');">util</a></tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="paramiko.util.bit_length" class="py-name" href="#" onclick="return doclink('link-66', 'bit_length', 'link-24');">bit_length</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
-</div></div><a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> </tt><script type="text/javascript">
+<a name="RSAKey._pkcs1imify"></a><div id="RSAKey._pkcs1imify-def"><a name="L152"></a><tt class="py-lineno">152</tt> <a class="py-toggle" href="#" id="RSAKey._pkcs1imify-toggle" onclick="return toggle('RSAKey._pkcs1imify');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.rsakey.RSAKey-class.html#_pkcs1imify">_pkcs1imify</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="RSAKey._pkcs1imify-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RSAKey._pkcs1imify-expanded"><a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
+<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"><tt class="py-docstring"> turn a 20-byte SHA1 hash into a blob of data as large as the key's N,</tt> </tt>
+<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"><tt class="py-docstring"> using PKCS1's \"emsa-pkcs1-v1_5\" encoding. totally bizarre.</tt> </tt>
+<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
+<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt class="py-name">SHA1_DIGESTINFO</tt> <tt class="py-op">=</tt> <tt class="py-string">'\x30\x21\x30\x09\x06\x05\x2b\x0e\x03\x02\x1a\x05\x00\x04\x14'</tt> </tt>
+<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-56" class="py-name"><a title="paramiko.util" class="py-name" href="#" onclick="return doclink('link-56', 'util', 'link-3');">util</a></tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="paramiko.util.deflate_long" class="py-name" href="#" onclick="return doclink('link-57', 'deflate_long', 'link-32');">deflate_long</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> <tt class="py-name">filler</tt> <tt class="py-op">=</tt> <tt class="py-string">'\xff'</tt> <tt class="py-op">*</tt> <tt class="py-op">(</tt><tt class="py-name">size</tt> <tt class="py-op">-</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">SHA1_DIGESTINFO</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
+<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'\x00\x01'</tt> <tt class="py-op">+</tt> <tt class="py-name">filler</tt> <tt class="py-op">+</tt> <tt class="py-string">'\x00'</tt> <tt class="py-op">+</tt> <tt class="py-name">SHA1_DIGESTINFO</tt> <tt class="py-op">+</tt> <tt class="py-name">data</tt> </tt>
+</div><a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> </tt>
+<a name="RSAKey._from_private_key_file"></a><div id="RSAKey._from_private_key_file-def"><a name="L162"></a><tt class="py-lineno">162</tt> <a class="py-toggle" href="#" id="RSAKey._from_private_key_file-toggle" onclick="return toggle('RSAKey._from_private_key_file');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.rsakey.RSAKey-class.html#_from_private_key_file">_from_private_key_file</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">password</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="RSAKey._from_private_key_file-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RSAKey._from_private_key_file-expanded"><a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_private_key_file</tt><tt class="py-op">(</tt><tt class="py-string">'RSA'</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
+<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_decode_key</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> </tt>
+<a name="RSAKey._from_private_key"></a><div id="RSAKey._from_private_key-def"><a name="L166"></a><tt class="py-lineno">166</tt> <a class="py-toggle" href="#" id="RSAKey._from_private_key-toggle" onclick="return toggle('RSAKey._from_private_key');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.rsakey.RSAKey-class.html#_from_private_key">_from_private_key</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">file_obj</tt><tt class="py-op">,</tt> <tt class="py-param">password</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="RSAKey._from_private_key-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RSAKey._from_private_key-expanded"><a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_private_key</tt><tt class="py-op">(</tt><tt class="py-string">'RSA'</tt><tt class="py-op">,</tt> <tt class="py-name">file_obj</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
+<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_decode_key</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> </tt>
+<a name="RSAKey._decode_key"></a><div id="RSAKey._decode_key-def"><a name="L170"></a><tt class="py-lineno">170</tt> <a class="py-toggle" href="#" id="RSAKey._decode_key-toggle" onclick="return toggle('RSAKey._decode_key');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.rsakey.RSAKey-class.html#_decode_key">_decode_key</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="RSAKey._decode_key-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RSAKey._decode_key-expanded"><a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> <tt class="py-comment"># private key file contains:</tt> </tt>
+<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt class="py-comment"># RSAPrivateKey = { version = 0, n, e, d, p, q, d mod p-1, d mod q-1, q**-1 mod p }</tt> </tt>
+<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-name">keylist</tt> <tt class="py-op">=</tt> <tt id="link-58" class="py-name"><a title="paramiko.ber.BER" class="py-name" href="#" onclick="return doclink('link-58', 'BER', 'link-9');">BER</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name" targets="Method paramiko.ber.BER.decode()=paramiko.ber.BER-class.html#decode"><a title="paramiko.ber.BER.decode" class="py-name" href="#" onclick="return doclink('link-59', 'decode', 'link-59');">decode</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt id="link-60" class="py-name"><a title="paramiko.ber.BERException" class="py-name" href="#" onclick="return doclink('link-60', 'BERException', 'link-10');">BERException</a></tt><tt class="py-op">:</tt> </tt>
+<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-61" class="py-name"><a title="paramiko.SSHException" class="py-name" href="#" onclick="return doclink('link-61', 'SSHException', 'link-16');">SSHException</a></tt><tt class="py-op">(</tt><tt class="py-string">'Unable to parse key file'</tt><tt class="py-op">)</tt> </tt>
+<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">keylist</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">keylist</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-62" class="py-name"><a title="paramiko.SSHException" class="py-name" href="#" onclick="return doclink('link-62', 'SSHException', 'link-16');">SSHException</a></tt><tt class="py-op">(</tt><tt class="py-string">'Not a valid RSA private key file (bad ber encoding)'</tt><tt class="py-op">)</tt> </tt>
+<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
+<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> </tt>
+<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
+<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt class="py-comment"># not really needed</tt> </tt>
+<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> </tt>
+<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-name">keylist</tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> </tt>
+<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt id="link-63" class="py-name"><a title="paramiko.util" class="py-name" href="#" onclick="return doclink('link-63', 'util', 'link-3');">util</a></tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="paramiko.util.bit_length" class="py-name" href="#" onclick="return doclink('link-64', 'bit_length', 'link-24');">bit_length</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
+</div></div><a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
@@ -321,7 +301,7 @@ expandto(location.href);
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
- Generated by Epydoc 3.0.1 on Sun Nov 1 22:14:19 2009
+ Generated by Epydoc 3.0.1 on Mon May 23 13:50:06 2011
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"