[project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-15]
random doc/comment tweaks
This commit is contained in:
parent
c0b22a3aec
commit
81ba7dccef
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net>
|
||||
#
|
||||
# This file is part of paramiko.
|
||||
|
@ -286,7 +284,6 @@ class PKey (object):
|
|||
cipher = self._CIPHER_TABLE[encryption_type]['cipher']
|
||||
keysize = self._CIPHER_TABLE[encryption_type]['keysize']
|
||||
mode = self._CIPHER_TABLE[encryption_type]['mode']
|
||||
# this confusing line turns something like '2F91' into '/\x91' (sorry, was feeling clever)
|
||||
salt = util.unhexify(saltstr)
|
||||
key = util.generate_key_bytes(MD5, salt, password, keysize)
|
||||
return cipher.new(key, mode, salt).decrypt(data)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net>
|
||||
#
|
||||
# This file is part of paramiko.
|
||||
|
@ -90,11 +88,11 @@ class RSAKey (PKey):
|
|||
def verify_ssh_sig(self, data, msg):
|
||||
if msg.get_string() != 'ssh-rsa':
|
||||
return False
|
||||
sig = util.inflate_long(msg.get_string(), 1)
|
||||
# verify the signature by SHA'ing the data and encrypting it using the
|
||||
sig = util.inflate_long(msg.get_string(), True)
|
||||
# verify the signature by SHA'ing the data and encrypting it using theŒ
|
||||
# public key. some wackiness ensues where we "pkcs1imify" the 20-byte
|
||||
# hash into a string as long as the RSA key.
|
||||
hash = util.inflate_long(self._pkcs1imify(SHA.new(data).digest()), 1)
|
||||
hash = util.inflate_long(self._pkcs1imify(SHA.new(data).digest()), True)
|
||||
rsa = RSA.construct((long(self.n), long(self.e)))
|
||||
return rsa.verify(hash, (sig,))
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ class ServerInterface (object):
|
|||
|
||||
The default implementation always returns C{False}.
|
||||
|
||||
@param channel: the L{Channel} the pty request arrived on.
|
||||
@param channel: the L{Channel} the request arrived on.
|
||||
@type channel: L{Channel}
|
||||
@return: C{True} if this channel is now hooked up to a shell; C{False}
|
||||
if a shell can't or won't be provided.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net>
|
||||
#
|
||||
# This file is part of paramiko.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net>
|
||||
#
|
||||
# This file is part of paramiko.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net>
|
||||
#
|
||||
# This file is part of paramiko.
|
||||
|
|
Loading…
Reference in New Issue