KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/site-packages/M2Crypto/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/site-packages/M2Crypto/RSA.pyo
mò
:PDc@sdZdkZdkZdkZdkZdkZdefd„ƒYZeieƒei	Z	ei
Z
eiZeiZdfd„ƒYZ
de
fd„ƒYZd„Zeid	„Zed
„Zeid„Zeid„Zeid
„Zd„Zd„Zd„ZdS(scM2Crypto wrapper for OpenSSL RSA API.

Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved.NtRSAErrorcBstZRS(N(t__name__t
__module__(((t2/usr/lib64/python2.4/site-packages/M2Crypto/RSA.pyRstRSAcBsìtZdZeiZdd„Zd„Zd„Zd„Z	d„Z
d„Zd„Zd	„Z
d
„Zdeid„Zdeid
„ZeZdeid„Zd„Zd„Zd„Zd„Zd„Zdd„Zdd„ZRS(s
    RSA Key Pair.
    icCs||_||_dS(N(trsatselft_pyfree(RRR((Rt__init__s	cCs+t|ddƒo|i|iƒndS(NRi(tgetattrRtm2_rsa_freeR(R((Rt__del__scCsti|iƒd>S(Ni(tm2trsa_sizeRR(R((Rt__len__"scCsL|djoti|iƒSn(|djoti|iƒSnt‚dS(Ntetn(tnameRt	rsa_get_eRRt	rsa_get_ntAttributeError(RR((Rt__getattr__%s


cCs"ti|iƒti|iƒfS(N(RRRRR(R((Rtpub-scCsti|i||ƒS(N(Rtrsa_public_encryptRRtdatatpadding(RRR((Rtpublic_encrypt1scCsti|i||ƒS(N(Rtrsa_public_decryptRRRR(RRR((Rtpublic_decrypt5scCsti|i||ƒS(N(Rtrsa_private_encryptRRRR(RRR((Rtprivate_encrypt9scCsti|i||ƒS(N(Rtrsa_private_decryptRRRR(RRR((Rtprivate_decrypt=staes_128_cbccCs‰|djo ti|i|iƒ|ƒSnYt	t|dƒ}|djotd|‚n
|ƒ}ti|i|iƒ||ƒSdS(sR
        Save the key pair to an M2Crypto.BIO.BIO object in PEM format.

        @type bio: M2Crypto.BIO.BIO
        @param bio: M2Crypto.BIO.BIO object to save key to.

        @type cipher: string
        @param cipher: Symmetric cipher to protect the key. The default
        cipher is 'aes_128_cbc'. If cipher is None, then the key is saved
        in the clear.

        @type callback: Python callable
        @param callback: A Python callable object that is invoked
        to acquire a passphrase with which to protect the key.
        The default is util.passphrase_callback.
        snot such cipher %sN(
tciphertNoneRtrsa_write_key_no_cipherRRtbiot_ptrtcallbackR	tciphRt
rsa_write_key(RR%R"R'R(((Rtsave_key_bioAs
 
	cCs%ti|dƒ}|i|||ƒS(s+
        Save the key pair to a file in PEM format.

        @type file: string
        @param file: Name of file to save key to.

        @type cipher: string
        @param cipher: Symmetric cipher to protect the key. The default
        cipher is 'aes_128_cbc'. If cipher is None, then the key is saved
        in the clear.

        @type callback: Python callable
        @param callback: A Python callable object that is invoked
        to acquire a passphrase with which to protect the key.
        The default is util.passphrase_callback.
        twbN(tBIOtopenfiletfileR%RR*R"R'(RR.R"R'R%((Rtsave_key\scCs)tiƒ}|i|||ƒ|iƒS(sB
        Returns the key(pair) as a string in PEM format.
        N(R,tMemoryBufferR%RR*R"R'tread(RR"R'R%((Rtas_pemrscCsti|i|iƒƒS(s±
        Save the key pair to an M2Crypto.BIO.BIO object in DER format.

        @type bio: M2Crypto.BIO.BIO
        @param bio: M2Crypto.BIO.BIO object to save key to.
        N(Rtrsa_write_key_derRRR%R&(RR%((Rtsave_key_der_biozscCsti|dƒ}|i|ƒS(s
        Save the key pair to a file in DER format.

        @type bio: M2Crypto.BIO.BIO
        @param bio: M2Crypto.BIO.BIO object to save key to.
        R+N(R,R-R.R%RR4(RR.R%((Rtsave_key_derƒscCsti|i|iƒƒS(s³
        Save the public key to an M2Crypto.BIO.BIO object in PEM format.

        @type bio: M2Crypto.BIO.BIO
        @param bio: M2Crypto.BIO.BIO object to save key to.
        N(Rtrsa_write_pub_keyRRR%R&(RR%((Rtsave_pub_key_bioscCs+ti|dƒ}ti|i|iƒƒS(sŒ
        Save the public key to a file in PEM format.

        @type file: string
        @param file: Name of file to save key to.
        R+N(	R,R-R.R%RR6RRR&(RR.R%((Rtsave_pub_key–scCsti|iƒS(N(Rt
rsa_check_keyRR(R((Rt	check_key stsha1cCsLttd|dƒ}|djotd|f‚nti|i||ƒS(ss
        Signs a digest with the private key

        @type digest: str
        @param digest: A digest created by using the digest method

        @type algo: str
        @param algo: The method that created the digest.
        Legal values are 'sha1','sha224', 'sha256', 'ripemd160', 
        and 'md5'.
        
        @return a string which is the signature
        tNID_sunknown algorithmN(
R	RtalgoR#tdigest_typet
ValueErrortrsa_signRRtdigest(RRAR=R>((Rtsign£s


cCsOttd|dƒ}|djotd|f‚nti|i|||ƒS(s

        Verifies the signature with the public key

        @type data: str
        @param data: Data that has been signed

        @type signature: str
        @param signature: The signature signed with the private key

        @type algo: str
        @param algo: The method use to create digest from the data 
        before it was signed.  Legal values are 'sha1','sha224',
        'sha256', 'ripemd160', and 'md5'.

        @returns True or False, depending on whether the signature was
        verified.  
        R<sunknown algorithmN(R	RR=R#R>R?t
rsa_verifyRRRt	signature(RRRDR=R>((Rtverify·s

(RRt__doc__Rtrsa_freeR
RRRRRRRRR tutiltpassphrase_callbackR*R/tsave_pemR2R4R5R7R8R:RBRE(((RRs,												
			
	tRSA_pubcBsDtZdZd„Zd„Zd„ZeiZei	Z
d„ZRS(s0
    Object interface to an RSA public key.
    cCs1|ddgjo
td‚n||i|<dS(NRRs0use factory function new_pub_key() to set (e, n)(RRtvalueRt__dict__(RRRL((Rt__setattr__Ös
cGs
td‚dS(Ns!RSA_pub object has no private key(R(Rtargv((RRÝscGs
td‚dS(Ns!RSA_pub object has no private key(R(RRO((RR àscCsti|iƒS(N(Rtrsa_check_pub_keyRR(R((RR:ës(RRRFRNRR RR8R/R7R*R:(((RRKÐs					cCsttitiƒƒ‚dS(N(RRterr_reason_error_stringt
err_get_error(((Rt	rsa_errorïscCs1ddddg}|i||ƒ|iƒdS(s)
    Default callback for gen_key().
    t.t+t*s
N(tchtouttwritetptflush(RZRRXRW((Rtkeygen_callbackóscCstti|||ƒdƒS(s·
    Generate an RSA key pair.

    @type bits: int
    @param bits: Key length, in bits.

    @type e: int
    @param e: The RSA public exponent.

    @type callback: Python callable
    @param callback: A Python callable object that is invoked
    during key generation; its usual purpose is to provide visual
    feedback. The default callback is keygen_callback.

    @rtype: M2Crypto.RSA.RSA
    @return: M2Crypto.RSA.RSA object.
    iN(RRtrsa_generate_keytbitsRR'(R^RR'((Rtgen_keyüscCsti|ƒ}t||ƒS(s–
    Load an RSA key pair from file.

    @type file: string
    @param file: Name of file containing RSA public key in PEM format.

    @type callback: Python callable
    @param callback: A Python callable object that is invoked
    to acquire a passphrase with which to unlock the key.
    The default is util.passphrase_callback.

    @rtype: M2Crypto.RSA.RSA
    @return: M2Crypto.RSA.RSA object.
    N(R,R-R.R%tload_key_bioR'(R.R'R%((Rtload_keyscCs=ti|iƒ|ƒ}|djotƒnt|dƒS(sÁ
    Load an RSA key pair from an M2Crypto.BIO.BIO object.

    @type bio: M2Crypto.BIO.BIO
    @param bio: M2Crypto.BIO.BIO object containing RSA key pair in PEM
    format.

    @type callback: Python callable
    @param callback: A Python callable object that is invoked
    to acquire a passphrase with which to unlock the key.
    The default is util.passphrase_callback.

    @rtype: M2Crypto.RSA.RSA
    @return: M2Crypto.RSA.RSA object.
    iN(	Rtrsa_read_keyR%R&R'RR#RSR(R%R'R((RR`$s

cCsti|ƒ}t||ƒS(s–
    Load an RSA key pair from a string.

    @type string: string
    @param string: String containing RSA key pair in PEM format.

    @type callback: Python callable
    @param callback: A Python callable object that is invoked
    to acquire a passphrase with which to unlock the key.
    The default is util.passphrase_callback.

    @rtype: M2Crypto.RSA.RSA
    @return: M2Crypto.RSA.RSA object.
    N(R,R0tstringR%R`R'(RcR'R%((Rtload_key_string:scCsti|ƒ}t|ƒS(sÖ
    Load an RSA public key from file.

    @type file: string
    @param file: Name of file containing RSA public key in PEM format.

    @rtype: M2Crypto.RSA.RSA_pub
    @return: M2Crypto.RSA.RSA_pub object.
    N(R,R-R.R%tload_pub_key_bio(R.R%((Rtload_pub_keyMs	cCs:ti|iƒƒ}|djotƒnt|dƒS(s
    Load an RSA public key from an M2Crypto.BIO.BIO object.

    @type bio: M2Crypto.BIO.BIO
    @param bio: M2Crypto.BIO.BIO object containing RSA public key in PEM
    format.

    @rtype: M2Crypto.RSA.RSA_pub
    @return: M2Crypto.RSA.RSA_pub object.
    iN(Rtrsa_read_pub_keyR%R&RR#RSRK(R%R((RRe[s


cCsE|\}}tiƒ}ti||ƒti||ƒt|dƒS(sÿ
    Instantiate an RSA_pub object from an (e, n) tuple.

    @type e: string
    @param e: The RSA public exponent; it is a string in OpenSSL's MPINT 
    format - 4-byte big-endian bit-count followed by the appropriate 
    number of bits.

    @type n: string
    @param n: The RSA composite of primes; it is a string in OpenSSL's MPINT 
    format - 4-byte big-endian bit-count followed by the appropriate 
    number of bits.

    @rtype: M2Crypto.RSA.RSA_pub
    @return: M2Crypto.RSA.RSA_pub object.
    iN(RRRtrsa_newRt	rsa_set_et	rsa_set_nRK(t.0RRR((Rtnew_pub_keyls
(RFtsysRHR,tErrRt	ExceptionRtrsa_initt
no_paddingt
pkcs1_paddingtsslv23_paddingtpkcs1_oaep_paddingRRKRStstdoutR\R_RIRaR`RdRfReRl(RaReRrR,RSRKR\RR`RnRlRfRsRqRHRRdRmR_RRt((Rt?s&	$
				¾				

Anon7 - 2021