Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
°‹EYc@sìdZddlZddlmZddlZddlmZddlmZddl	m
Z
ddlmZm
Z
mZddlmZdd	lmZdd
lmZmZmZmZddlmZmZdefd
„ƒYZdS(s!
Common API for all public keys.
iÿÿÿÿN(t	unhexlify(tmd5(tdefault_backend(t
serialization(t
algorithmstmodestCipher(tutil(to600(tutencodebytestdecodebytestb(tSSHExceptiontPasswordRequiredExceptiontPKeycBsmeZdZiiejd6dd6dd6ejd6d6iejd6dd6dd6ejd6d6iejd6d	d6d
d6ejd6d6Zd d d„Z
d
„Zd„Zd„Z
d„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zed d„ƒZed d„ƒZd d„Zd d„Zd d„Zd d„Zd d„Zd d„ZRS(!s%
    Base class for public keys.
    tcipheritkeysizet	blocksizetmodesAES-128-CBCi sAES-256-CBCiisDES-EDE3-CBCcCsdS(s[
        Create a new instance of this public key type.  If ``msg`` is given,
        the key's public part(s) will be filled in from the message.  If
        ``data`` is given, the key's public part(s) will be filled in from
        the string.

        :param .Message msg:
            an optional SSH `.Message` containing a public key of this type.
        :param str data: an optional string containing a public key
            of this type

        :raises: `.SSHException` --
            if a key cannot be created from the ``data`` or ``msg`` given, or
            no key was passed in.
        N((tselftmsgtdata((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt__init__AscCstƒS(sÇ
        Return a string of an SSH `.Message` made up of the public part(s) of
        this key.  This string is suitable for passing to `__init__` to
        re-create the key object later.
        (tbytes(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytasbytesSscCs
|jƒS(N(R(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt__str__[scCsJt|ƒ}t|ƒ}||kr1t||ƒSt|jƒ|jƒƒS(sB
        Compare this key to another.  Returns 0 if this key is equivalent to
        the given key, or non-0 if they are different.  Only the public parts
        of the key are compared, so a public key will compare equal to its
        corresponding private key.

        :param .PKey other: key to compare to.
        (thashtcmpR(Rtotherthstho((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt__cmp__as
	
cCst|ƒt|ƒkS(N(R(RR((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt__eq__pscCsdS(sË
        Return the name of this private key implementation.

        :return:
            name of this private key type, in SSH terminology, as a `str` (for
            example, ``"ssh-rsa"``).
        t((R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytget_namesscCsdS(s¸
        Return the number of significant bits in this key.  This is useful
        for judging the relative security of a key.

        :return: bits in the key (as an `int`)
        i((R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytget_bits}scCstS(sf
        Return ``True`` if this key has the private part necessary for signing
        data.
        (tFalse(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytcan_sign†scCst|jƒƒjƒS(sã
        Return an MD5 fingerprint of the public part of this key.  Nothing
        secret is revealed.

        :return:
            a 16-byte `string <str>` (binary) of the MD5 fingerprint, in SSH
            format.
        (RRtdigest(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytget_fingerprints	cCs"tt|jƒƒƒjddƒS(s+
        Return a base64 string containing the public part of this key.  Nothing
        secret is revealed.  This format is compatible with that used to store
        public key files or recognized host keys.

        :return: a base64 `string <str>` containing the public part of the key.
        s
R"(R	R
Rtreplace(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt
get_base64˜scCstƒS(sç
        Sign a blob of data with this private key, and return a `.Message`
        representing an SSH signature message.

        :param str data: the data to sign.
        :return: an SSH signature `message <.Message>`.
        (R(RR((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt
sign_ssh_data¢scCstS(s\
        Given a blob of data, and an SSH message representing a signature of
        that data, verify that it was signed with this key.

        :param str data: the data that was signed.
        :param .Message msg: an SSH signature message
        :return:
            ``True`` if the signature verifies correctly; ``False`` otherwise.
        (R%(RRR((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytverify_ssh_sig¬s
cCs|d|d|ƒ}|S(s²
        Create a key object by reading a private key file.  If the private
        key is encrypted and ``password`` is not ``None``, the given password
        will be used to decrypt the key (otherwise `.PasswordRequiredException`
        is thrown).  Through the magic of Python, this factory method will
        exist in all subclasses of PKey (such as `.RSAKey` or `.DSSKey`), but
        is useless on the abstract PKey class.

        :param str filename: name of the file to read
        :param str password:
            an optional password to use to decrypt the key file, if it's
            encrypted
        :return: a new `.PKey` based on the given private key

        :raises: ``IOError`` -- if there was an error reading the file
        :raises: `.PasswordRequiredException` -- if the private key file is
            encrypted, and ``password`` is ``None``
        :raises: `.SSHException` -- if the key file is invalid
        tfilenametpassword((tclsR-R.tkey((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytfrom_private_key_file¸scCs|d|d|ƒ}|S(s
        Create a key object by reading a private key from a file (or file-like)
        object.  If the private key is encrypted and ``password`` is not
        ``None``, the given password will be used to decrypt the key (otherwise
        `.PasswordRequiredException` is thrown).

        :param file_obj: the file-like object to read from
        :param str password:
            an optional password to use to decrypt the key, if it's encrypted
        :return: a new `.PKey` based on the given private key

        :raises: ``IOError`` -- if there was an error reading the key
        :raises: `.PasswordRequiredException` --
            if the private key file is encrypted, and ``password`` is ``None``
        :raises: `.SSHException` -- if the key file is invalid
        tfile_objR.((R/R2R.R0((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytfrom_private_keyÐscCstdƒ‚dS(sŸ
        Write private key contents into a file.  If the password is not
        ``None``, the key is encrypted before writing.

        :param str filename: name of the file to write
        :param str password:
            an optional password to use to encrypt the key file

        :raises: ``IOError`` -- if there was an error writing the file
        :raises: `.SSHException` -- if the key is invalid
        sNot implemented in PKeyN(t	Exception(RR-R.((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytwrite_private_key_fileåscCstdƒ‚dS(s¬
        Write private key contents into a file (or file-like) object.  If the
        password is not ``None``, the key is encrypted before writing.

        :param file_obj: the file-like object to write into
        :param str password: an optional password to use to encrypt the key

        :raises: ``IOError`` -- if there was an error writing to the file
        :raises: `.SSHException` -- if the key is invalid
        sNot implemented in PKeyN(R4(RR2R.((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pytwrite_private_keyóscCs1t|dƒ}|j|||ƒ}WdQX|S(sí
        Read an SSH2-format private key file, looking for a string of the type
        ``"BEGIN xxx PRIVATE KEY"`` for some ``xxx``, base64-decode the text we
        find, and return it as a string.  If the private key is encrypted and
        ``password`` is not ``None``, the given password will be used to
        decrypt the key (otherwise `.PasswordRequiredException` is thrown).

        :param str tag: ``"RSA"`` or ``"DSA"``, the tag used to mark the
            data block.
        :param str filename: name of the file to read.
        :param str password:
            an optional password to use to decrypt the key file, if it's
            encrypted.
        :return: data blob (`str`) that makes up the private key.

        :raises: ``IOError`` -- if there was an error reading the file.
        :raises: `.PasswordRequiredException` -- if the private key file is
            encrypted, and ``password`` is ``None``.
        :raises: `.SSHException` -- if the key file is invalid.
        trN(topent_read_private_key(RttagR-R.tfR((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt_read_private_key_filescCsæ|jƒ}d}d|d}x6|t|ƒkrX||jƒ|krX|d7}q#W|t|ƒkr‚td|dƒ‚ni}|d7}xg|t|ƒkrû||jdƒ}t|ƒdkrÐPn|djƒ||djƒ<|d7}q•W|}	d|d}
x6|	t|ƒkrH||	jƒ|
krH|	d7}	qWy&ttd	j|||	!ƒƒƒ}Wn/t	j
jk
r }td
t|ƒƒ‚nXd|kr±|S|ddkrØtd
|dƒ‚ny|djdƒ\}
}Wntdƒ‚nX|
|j
kr-td|
ƒ‚n|dkrHtdƒ‚n|j
|
d}|j
|
d}|j
|
d}tt|ƒƒ}tjt|||ƒ}t||ƒ||ƒdtƒƒjƒ}|j|ƒ|jƒS(Nis-----BEGIN s PRIVATE KEY-----isnot a valid s private key files: s	-----END R"sbase64 decoding error: s	proc-types4,ENCRYPTEDs"Unknown private key structure "%s"sdek-infot,s(Can't parse DEK-info in private key filesUnknown private key cipher "%s"sPrivate key file is encryptedRRRtbackend(t	readlinestlentstripR
tsplittlowerRRtjointbase64tbinasciitErrortstrt
_CIPHER_TABLEtNoneRRRtgenerate_key_bytesRRRt	decryptortupdatetfinalize(RR:R;R.tlineststarttbeginning_of_keytheaderstltendt
ending_of_keyRtetencryption_typetsaltstrRRRtsaltR0RL((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyR9sZ+
+&'c
CsEt|dƒ0}tj|tƒ|j|||d|ƒWdQXdS(s’
        Write an SSH2-format private key file in a form that can be read by
        paramiko or openssh.  If no password is given, the key is written in
        a trivially-encoded format (base64) which is completely insecure.  If
        a password is given, DES-EDE3-CBC is used.

        :param str tag:
            ``"RSA"`` or ``"DSA"``, the tag used to mark the data block.
        :param filename: name of the file to write.
        :param str data: data blob that makes up the private key.
        :param str password: an optional password to use to encrypt the file.

        :raises: ``IOError`` -- if there was an error writing the file.
        twR.N(R8tostchmodRt_write_private_key(RR-R0tformatR.R;((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt_write_private_key_filePscCs\|dkrtjƒ}ntjt|ƒƒ}|j|jtjj||ƒj	ƒƒdS(N(
RJRtNoEncryptiontBestAvailableEncryptionRtwritet
private_bytestEncodingtPEMtdecode(RR;R0R^R.t
encryption((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyR]cs	N(t__name__t
__module__t__doc__RtAESRtCBCt	TripleDESRIRJRRRR R!R#R$R&R(R*R+R,tclassmethodR1R3R5R6R<R9R_R](((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyR&sN


					
					
	
	
7(RjRERFRR[thashlibRtcryptography.hazmat.backendsRtcryptography.hazmat.primitivesRt&cryptography.hazmat.primitives.ciphersRRRtparamikoRtparamiko.commonRtparamiko.py3compatR	R
RRtparamiko.ssh_exceptionR
RtobjectR(((sB/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/pkey.pyt<module>s"