Part of twisted.conch.ssh View Source
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 30 | Class | BadKeyError | Raised when a key isn't what we expected from it. |
| 37 | Class | EncryptedKeyError | Raised when an encrypted key is presented to fromString/fromFile without |
| 43 | Class | Key | An object representing a key. A key can be either a public or |
| 694 | Function | getPublicKeyString | Return a public key string suitable for being sent over the wire. |
| 718 | Function | makePublicKeyString | Return an public key given a
Crypto.PublicKey.pubkey.pubkey
|
| 737 | Function | getPublicKeyObject | Return a Crypto.PublicKey.pubkey.pubkey corresponding to
the SSHv2
|
| 753 | Function | getPrivateKeyObject | Return a Crypto.PublicKey.pubkey.pubkey object
corresponding to the
|
| 778 | Function | makePrivateKeyString | Return an OpenSSH-style private key for a |
| 798 | Function | makePublicKeyBlob | Make a public key blob from a
Crypto.PublicKey.pubkey.pubkey.
|
| 810 | Function | objectType | Return the SSH key type corresponding to a
Crypto.PublicKey.pubkey.pubkey
|
| 828 | Function | pkcs1Pad | Pad out data to messageLength according to the PKCS#1 standard. |
| 837 | Function | pkcs1Digest | Create a message digest using the SHA1 hash algorithm according to the |
| 847 | Function | lenSig | Return the length of the signature in bytes for a key object. |
| 856 | Function | signData | Sign the data with the given
Crypto.PublicKey.pubkey.pubkey object.
|
| 872 | Function | verifySignature | Verify that the signature for the data is valid. |
| 889 | Function | printKey | Pretty print a Crypto.PublicKey.pubkey.pubkey object.
|
Return a public key string suitable for being sent over the wire. Takes a filename or data of a public key. Currently handles OpenSSH and LSH keys.
This function has been deprecated since Twisted Conch 0.9. Use Key.fromString() instead.| Parameters | filename | (type: str
) |
| line | (type: int
) | |
| data | (type: str
) | |
| Returns | (type: str
) | |
Return an public key given a
Crypto.PublicKey.pubkey.pubkey object. kind is one of
('openssh', 'lsh')
| Parameters | obj | (type: Crypto.PublicKey.pubkey.pubkey
) |
| comment | (type: str
) | |
| kind | (type: str
) | |
| Returns | (type: str
) | |
Return a Crypto.PublicKey.pubkey.pubkey corresponding to
the SSHv2 public key data. data is in the over-the-wire public key
format.
| Parameters | data | (type: str
) |
| Returns | (type: Crypto.PublicKey.pubkey.pubkey
) | |
Return a Crypto.PublicKey.pubkey.pubkey object
corresponding to the private key file/data. If the private key is
encrypted, passphrase must be specified, other wise a BadKeyError
will be raised.
| Parameters | filename | (type: str
) |
| data | (type: str
) | |
| passphrase | (type: str
) | |
| Returns | (type: Crypto.PublicKey.pubkey.pubkey
) | |
| Raises | BadKeyError | if the key is invalid or a passphrase is not specified |
Return an OpenSSH-style private key for a
Crypto.PublicKey.pubkey.pubkey object. If passphrase is
given, encrypt the private key with it. kind is one of ('openssh', 'lsh',
'agentv3')
| Parameters | obj | (type: Crypto.PublicKey.pubkey.pubkey
) |
| passphrase | (type: str/None
) | |
| kind | (type: str
) | |
| Returns | (type: str
) | |
Make a public key blob from a
Crypto.PublicKey.pubkey.pubkey.
Crypto.PublicKey.pubkey.pubkey object.
| Parameters | obj | (type: Crypto.PublicKey.pubkey.pubkey
) |
| Returns | (type: str
) | |
| Parameters | data | (type: str
) |
| messageLength | (type: int
) |
| Parameters | data | (type: str
) |
| messageLength | (type: str
) |
| Parameters | obj | (type: Crypto.PublicKey.pubkey.pubkey
) |
| Returns | (type: long
) | |
Sign the data with the given
Crypto.PublicKey.pubkey.pubkey object.
| Parameters | obj | (type: Crypto.PublicKey.pubkey.pubkey
) |
| data | (type: str
) | |
| Returns | (type: str
) | |
Verify that the signature for the data is valid.
This method is deprecated since Twisted Conch 0.9. Use Key().verify().| Parameters | obj | (type: Crypto.PublicKey.pubkey.pubkey
) |
| sig | (type: str
) | |
| data | (type: str
) | |
| Returns | (type: bool
) | |
Pretty print a Crypto.PublicKey.pubkey.pubkey object.
| Parameters | obj | (type: Crypto.PublicKey.pubkey.pubkey
) |