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 :  /proc/21585/root/usr/lib64/python2.4/site-packages/M2Crypto/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/site-packages/M2Crypto/EVP.pyo
mς
:PDc@s·dZdklZlZlZlZdkZdfd„ƒYZdfd„ƒYZdd„Z	d	fd
„ƒYZ
dfd„ƒYZeid
„Z
eid„Zeid„ZdS(sΓM2Crypto wrapper for OpenSSL EVP API.

Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved.

Portions Copyright (c) 2004-2006 Open Source Applications Foundation.
Author: Heikki Toivonen
(sErrsutilsBIOsRSANt
MessageDigestcBsAtZdZeiZd„Zd„Zd„Zd„Z	e	Z
RS(s
    Message Digest
    cCsgtt|dƒ}|djotd|f‚n|ƒ|_tiƒ|_ti	|i|iƒdS(Nsunknown algorithm(
tgetattrtm2talgotNonetmdt
ValueErrortselft
md_ctx_newtctxtdigest_init(RRR((t2/usr/lib64/python2.4/site-packages/M2Crypto/EVP.pyt__init__s
cCs+t|ddƒo|i|iƒndS(NR	(RRRtm2_md_ctx_freeR	(R((Rt__del__scCsti|i|ƒS(s
        Add data to be digested.
        
        @return: -1 for Python error, 1 for success, 0 for OpenSSL failure.
        N(Rt
digest_updateRR	tdata(RR((RtupdatescCsti|iƒS(N(Rtdigest_finalRR	(R((Rtfinal&s(t__name__t
__module__t__doc__Rtmd_ctx_freeR
RRRRtdigest(((RRs					tHMACcBsGtZeiZdd„Zd„Zd„Zd„Zd„Z	e	Z
RS(Ntsha1cCsjtt|dƒ}|djotd|f‚n|ƒ|_tiƒ|_ti	|i||iƒdS(Nsunknown algorithm(RRRRRRRthmac_ctx_newR	t	hmac_inittkey(RRRR((RR1s
cCs+t|ddƒo|i|iƒndS(NR	(RRRtm2_hmac_ctx_freeR	(R((RR9scCsti|i||iƒdS(N(RRRR	RR(RR((Rtreset=scCsti|i|ƒdS(N(Rthmac_updateRR	R(RR((RR@scCsti|iƒS(N(Rt
hmac_finalRR	(R((RRCs(RRRt
hmac_ctx_freeRRRRRRR(((RR-s					RcCsHtt|dƒ}|djotd|f‚nti|||ƒƒS(Nsunknown algorithm(	RRRRRRthmacRR(RRRR((RR#Hs
tCiphercBsAtZeiZddddd„Zd„Zd„Zd„ZRS(	Nitmd5t12345678ic	CsΤtt|dƒ}
|
djotd|f‚n|
ƒ|_|oZtt|dƒ}	|	djotd|f‚nti
|i|	ƒ||||ƒ}ntiƒ|_ti|i|i|||ƒ~dS(Nsunknown ciphersunknown message digest(RRtalgRtcipherRRtkey_as_bytestdtkmdtbytes_to_keyRtsalttivtitcipher_ctx_newR	tcipher_inittop(RR'RR.R2R)R*R-R/R+R(((RRSs

(cCs+t|ddƒo|i|iƒndS(NR	(RRRtm2_cipher_ctx_freeR	(R((RRascCsti|i|ƒS(N(Rt
cipher_updateRR	R(RR((RRescCsti|iƒS(N(Rtcipher_finalRR	(R((RRhs(	RRRtcipher_ctx_freeR3RRRR(((RR$Os
			tPKeycBsψtZdZeiZeiZeddd„Z	d„Z
d„Zd„Zdd„Z
d„Zd	„Zd
„ZeZeZd„Zd„Zd
„Zdd„Zd„Zdeid„Zdeid„Zdeid„Zd„Zd„ZRS(s
    Public Key
    iRcCsL|dj	o||_||_ntiƒ|_d|_|i|ƒdS(Ni(tpkeyRRt_pyfreeRtpkey_newt_set_contextR(RR8R9R((RRts
	
	cCsRt|ddƒo|i|iƒnt|ddƒo|i|iƒndS(NR9iR	(RRtm2_pkey_freeR8RR
R	(R((RR}scCs|iS(N(RR8(R((Rt_ptrƒscCsQtt|dƒ}|djotd|f‚n|ƒ|_tiƒ|_dS(Nsunknown message digest(	RRRRtmdaRRRR	(RRR>((RR;†s

cCs|i|ƒdS(sƒ
        Reset internal message digest context.

        @type md: string
        @param md: The message digest algorithm.
        N(RR;R(RR((Rt
reset_contextscCsti|i|iƒdS(s9
        Initialise signing operation with self.
        N(Rt	sign_initRR	R(R((RR@–scCsti|i|ƒdS(su
        Feed data to signing operation.

        @type data: string
        @param data: Data to be signed.
        N(Rtsign_updateRR	R(RR((RRAœscCsti|i|iƒS(s[
        Return signature.

        @rtype: string
        @return: The signature.
        N(Rt
sign_finalRR	R8(R((RRB₯scCsti|i|iƒdS(sH
        Initialise signature verification operation with self.
        N(Rtverify_initRR	R(R((RRC²scCsti|i|ƒS(sΔ
        Feed data to verification operation.

        @type data: string
        @param data: Data to be verified.
        @return: -1 on Python error, 1 for success, 0 for OpenSSL error
        N(Rt
verify_updateRR	R(RR((RRDΈscCsti|id|iƒS(sŒ
        Return result of verification.

        @rtype: int
        @return: Result of verification: 1 for success, 0 for failure.
        N(Rtverify_finalRR	RR8(R((RREΒsicCsS|o0ti|i|iƒ}|o
d|_qOnti|i|iƒ}|S(sς
        Assign the RSA key pair to self.

        @type rsa: M2Crypto.RSA.RSA
        @param rsa: M2Crypto.RSA.RSA object to be assigned to self.

        @type capture:  boolean
        @param capture: If true (default), this PKey object will own the RSA
                        object, meaning that once the PKey object gets
                        deleted it is no longer safe to use the RSA object.
        
        @rtype: int
        @return: Return 1 for success and 0 for failure.
        iN(	tcaptureRtpkey_assign_rsaRR8trsatretR9t
pkey_set1_rsa(RRHRFRI((Rt
assign_rsaΛscCsEti|iƒ}|djotdƒ‚nti|dƒ}|S(sd
        Return the underlying RSA key if that is what the EVP
        instance is holding.
        s&PKey instance is not holding a RSA keyiN(	Rt
pkey_get1_rsaRR8trsa_ptrRRtRSARH(RRHRM((Rtget_rsaβs
taes_128_cbccCs%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(tBIOtopenfiletfiletbioRtsave_key_bioR(tcallback(RRTR(RWRU((Rtsave_keyξscCsƒ|djo ti|i|iƒ|ƒSnSt	t|dƒ}|djotd|‚nti|i|iƒ|ƒ|ƒSdS(sN
        Save the key pair to the M2Crypto.BIO object 'bio' in PEM format.

        @type bio: M2Crypto.BIO
        @param bio: M2Crypto.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.
        sno such cipher %sN(
R(RRtpkey_write_pem_no_cipherRR8RUR=RWRtprotoRtpkey_write_pem(RRUR(RWRZ((RRVs
 
cCs)tiƒ}|i|||ƒ|iƒS(sΩ
        Return key in PEM format in a string.

        @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.
        N(RRtMemoryBufferRURRVR(RWtread_all(RR(RWRU((Rtas_pems
cCs+ti|iƒ}ti|ƒ}|iƒS(s6
        Return key in DER format in a string
        N(	Rtpkey_as_derRR8tbufRRR\RUR](RRUR`((Rtas_der-scCsti|iƒS(s6
        Return the size of the key in bytes.
        N(Rt	pkey_sizeRR8(R((Rtsize5s(RRRRt	pkey_freeR<RR
RRRR=R;R?R@RARBRRRCRDRERKROtutiltpassphrase_callbackRXRVR^RaRc(((RR7ls.											
		
				cCsxti|dƒ}|djotiƒ‚nti||ƒ}ti
|ƒ|djotiƒ‚nt|dƒS(sj
    Load an M2Crypto.EVP.PKey from file.

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

    @type callback: Python callable
    @param callback: A Python callable object that is invoked
    to acquire a passphrase with which to protect the key.

    @rtype: M2Crypto.EVP.PKey
    @return: M2Crypto.EVP.PKey object.
    triN(Rtbio_new_fileRTRURtErrt	get_errort
pkey_read_pemRWtcptrtbio_freeR7(RTRWRURl((Rtload_key<s



cCsBti|iƒ|ƒ}|djotiƒ‚nt	|dƒS(sˆ
    Load an M2Crypto.EVP.PKey from an M2Crypto.BIO object.

    @type bio: M2Crypto.BIO
    @param file: M2Crypto.BIO object containing the key in PEM format.

    @type callback: Python callable
    @param callback: A Python callable object that is invoked
    to acquire a passphrase with which to protect the key.

    @rtype: M2Crypto.EVP.PKey
    @return: M2Crypto.EVP.PKey object.
    iN(
RRkRUR=RWRlRRiRjR7(RURWRl((Rtload_key_bioSs


cCsti|ƒ}t||ƒS(sj
    Load an M2Crypto.EVP.PKey from a string.

    @type string: string
    @param file: String containing the key in PEM format.

    @type callback: Python callable
    @param callback: A Python callable object that is invoked
    to acquire a passphrase with which to protect the key.

    @rtype: M2Crypto.EVP.PKey
    @return: M2Crypto.EVP.PKey object.
    N(RRR\tstringRURoRW(RpRWRU((Rtload_key_stringfs
(RtM2CryptoRiReRRRNRRRR#R$R7RfRnRoRq(
RRRRiR7RnRNR#ReR$RRqRRo((Rt?s	!Π

Anon7 - 2021