/usr/lib/python2.6/site-packages/rsa
NameSizeModeActions
asn1.py17810644editdlrm
asn1.pyc16530644editdlrm
asn1.pyo16530644editdlrm
bigfile.py51850644editdlrm
bigfile.pyc47860644editdlrm
bigfile.pyo47860644editdlrm
cli.py121850644editdlrm
cli.pyc133190644editdlrm
cli.pyo133190644editdlrm
common.py46400644editdlrm
common.pyc42350644editdlrm
common.pyo42350644editdlrm
core.py16560644editdlrm
core.pyc14850644editdlrm
core.pyo14850644editdlrm
key.py228670644editdlrm
key.pyc239860644editdlrm
key.pyo239860644editdlrm
parallel.py22990644editdlrm
parallel.pyc20980644editdlrm
parallel.pyo20980644editdlrm
pem.py35370644editdlrm
pem.pyc28430644editdlrm
pem.pyo28430644editdlrm
pkcs1.py122300644editdlrm
pkcs1.pyc111730644editdlrm
pkcs1.pyo111260644editdlrm
prime.py45600644editdlrm
prime.pyc36640644editdlrm
prime.pyo36180644editdlrm
randnum.py26430644editdlrm
randnum.pyc20740644editdlrm
randnum.pyo20740644editdlrm
transform.py68920644editdlrm
transform.pyc58560644editdlrm
transform.pyo58560644editdlrm
util.py30590644editdlrm
util.pyc25200644editdlrm
util.pyo24490644editdlrm
varblock.py54060644editdlrm
varblock.pyc48560644editdlrm
varblock.pyo48560644editdlrm
_compat.py38900644editdlrm
_compat.pyc36550644editdlrm
_compat.pyo36550644editdlrm
_version133.py117640644editdlrm
_version133.pyc136390644editdlrm
_version133.pyo136390644editdlrm
_version200.py151230644editdlrm
_version200.pyc152640644editdlrm
_version200.pyo152640644editdlrm
__init__.py14760644editdlrm
__init__.pyc11120644editdlrm
__init__.pyo11120644editdlrm
Edit: /usr/lib/python2.6/site-packages/rsa/cli.pyo (13319B)
Ñò |~úVc @€ssdZddklZlZddkZddkZddklZddkZddk Zddk Ze ei i iƒƒZ d„Zdefd„ƒYZdefd „ƒYZd efd „ƒYZd efd „ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZeƒZeƒZeƒZeƒZeƒZeƒZdS(sWCommandline scripts. These scripts are called by the executables defined in setup.py. iÿÿÿÿ(twith_statementtprint_functionN(t OptionParserc C€sRtddddƒ}|iddddd ƒ|id d dddd ƒ|id ddddddƒ|itidƒ\}}t|ƒdjo|iƒtdƒ‚nyt|dƒ}WnDt j o8|iƒt d|ddti ƒtdƒ‚nXt d|dti ƒt i |ƒ\}}|ioot d|idti ƒ|id|iƒ}t|idƒiiƒ}z|~}|i|ƒWdQXn|id|iƒ}|ioZt d|idti ƒt|idƒiiƒ} z| ~ }|i|ƒWdQXn$t ddti ƒtii|ƒdS(sKey generator.tusagesusage: %prog [options] keysizet descriptions.Generates a new RSA keypair of "keysize" bits.s--puboutttypetstringthelpsžOutput filename for the public key. The public key is not saved if this option is not present. You can use pyrsa-priv2pub to create the public key file later.s-os--outs`Output filename for the private key. The key is written to stdout if this option is not present.s--forms7key format of the private and public keys - default PEMtchoicestPEMtDERtdefaultiisNot a valid number: %stfilesGenerating %i-bit keysWriting public key to %stformattwbNsWriting private key to %ssWriting private key to stdout(R R (Rt add_optiont parse_argstsystargvtlent print_helpt SystemExittintt ValueErrortprinttstderrtrsatnewkeystpuboutt save_pkcs1tformtopent__exit__t __enter__twritetouttstdout( tparsertclitcli_argstkeysizetpub_keytpriv_keytdatat_[1]toutfilet_[2]((s+/usr/lib/python2.6/site-packages/rsa/cli.pytkeygen#sB       ) )tCryptoOperationcB€s§eZdZeiZdZdZdZ dZ dZ dZ dZ dZdZeZeiZd „Zeidd „ƒZd „Zd „Zd „Zd„Zd„ZRS(s9CLI callable that operates with input, output, and a key.tpublics'usage: %%prog [options] %(keyname)s_keytdecryptt decryptedt decryptingsEName of the file to %(operation)s. Reads from stdin if not specified.sjName of the file to write the %(operation_past)s file to. Written to stdout if this option is not present.icC€sF|i|ii|_|i|ii|_|i|ii|_dS(N(Rt __class__t__dict__t input_helpt output_help(tself((s+/usr/lib/python2.6/site-packages/rsa/cli.pyt__init__nscC€sdS(s€Performs the program's operation. Implement in a subclass. :returns: the data to write to the output. N((R9tindatatkeyR'((s+/usr/lib/python2.6/site-packages/rsa/cli.pytperform_operationsscC€s“|iƒ\}}|i|d|iƒ}|i|iƒ}t|iiƒdti ƒ|i |||ƒ}|i o|i ||i ƒndS(sRuns the program.iR N(t parse_clitread_keytkeyformt read_infiletinputRtoperation_progressivettitleRRR=t has_outputt write_outfiletoutput(R9R&R'R<R;toutdata((s+/usr/lib/python2.6/site-packages/rsa/cli.pyt__call__|s cC€sãtd|id|iƒ}|iddddd|iƒ|io#|idd ddd|iƒn|id dd |id ddd ƒ|it i dƒ\}}t |ƒ|i jo|i ƒtdƒ‚n||fS(sFParse the CLI options :returns: (cli_opts, cli_args) RRs-is--inputRRRs-os--outputs --keyforms&Key format of the %s key - default PEMRR R R i(sPEMsDER(RRRRR7RER8tkeynameRRRRtexpected_cli_argsRR(R9R%R&R'((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR>‹s #    cC€sktd|i|fdtiƒt|dƒiiƒ}z|~}|iƒ}WdQX|ii ||ƒS(sReads a public or private key.sReading %s key from %sR trbN( RRJRRRR R!treadt key_classt load_pkcs1(R9tfilenameR@R,tkeyfiletkeydata((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR?¤s &cC€sx|oQtd|dtiƒt|dƒiiƒ}z|~}|iƒSWdQXntddtiƒtiiƒS(sRead the input filesReading input from %sR RLNsReading input from stdin(RRRRR R!RMtstdin(R9tinnameR,tinfile((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRA­s &cC€s‚|oTtd|dtiƒt|dƒiiƒ}z|~}|i|ƒWdQXn$tddtiƒtii|ƒdS(sWrite the output filesWriting output to %sR RNsWriting output to stdout(RRRRR R!R"R$(R9RHtoutnameR,R-((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRF¸s &N(t__name__t __module__t__doc__tabctABCMetat __metaclass__RJRtNoneRt operationtoperation_pastRCR7R8RKtTrueRERt PublicKeyRNR:tabstractmethodR=RIR>R?RARF(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR0Zs*      tEncryptOperationcB€s8eZdZdZdZdZdZdZdd„Z RS(sEncrypts a file.R1sEncrypts a file. The file must be shorter than the key length in order to be encrypted. For larger files, use the pyrsa-encrypt-bigfile command.tencryptt encryptedt encryptingcC€sti||ƒS(sEncrypts files.(RRd(R9R;R)R'((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR=ÏsN( RWRXRYRJRR^R_RCR]R=(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRcÄstDecryptOperationcB€sAeZdZdZdZdZdZdZei Z dd„Z RS(sDecrypts a file.tprivates Decrypts a file. The original file must be shorter than the key length in order to have been encrypted. For larger files, use the pyrsa-decrypt-bigfile command.R2R3R4cC€sti||ƒS(sDecrypts files.(RR2(R9R;R*R'((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR=ásN( RWRXRYRJRR^R_RCRt PrivateKeyRNR]R=(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRgÕs t SignOperationcB€s]eZdZdZdZddieƒZdZdZ dZ e i Z dZd Zd „ZRS( s Signs a file.Rhs/usage: %%prog [options] private_key hash_methodsCSigns a file, outputs the signature. Choose the hash method from %ss, tsignt signaturetSigningis\Name of the file to write the signature to. Written to stdout if this option is not present.cC€sG|d}|tjotdditƒƒ‚nti|||ƒS(s Signs files.is%Invalid hash method, choose one of %ss, (t HASH_METHODSRtjoinRRk(R9R;R*R't hash_method((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR=÷s   (RWRXRYRJRRoRnRR^R_RCRRiRNRKR8R=(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRjçs tVerifyOperationcB€sPeZdZdZdZdZdZdZdZe i Z dZ e Zd„ZRS( sVerify a signature.R1s1usage: %%prog [options] public_key signature_filessVerifies a signature, exits with status 0 upon success, prints an error message and exits with status 1 upon error.tverifytverifiedt Verifyingic C€s•|d}t|dƒiiƒ}z|~}|iƒ}WdQXyti|||ƒWn"tij otdƒ‚nXtddt i ƒdS(sVerifies files.iRLNsVerification failed.sVerification OKR ( RR R!RMRRrtVerificationErrorRRRR(R9R;R)R'tsignature_fileR,tsigfileRl((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR=s &(RWRXRYRJRRR^R_RCRRaRNRKtFalseRER=(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRqs tBigfileOperationcB€s;eZdZd„Zd„Zd„Zd„Zd„ZRS(s>CryptoOperation that doesn't read the entire file into memory.cC€sti|ƒg|_dS(N(R0R:t file_objects(R9((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR:#s cC€s"x|iD]}|iƒq WdS(sCloses any open file handles.N(Rztclose(R9tfobj((s+/usr/lib/python2.6/site-packages/rsa/cli.pyt__del__(s cC€s…|iƒ\}}|i|d|iƒ}|i|iƒ}|i|iƒ}t|ii ƒdt i ƒ|i ||||ƒdS(sRuns the program.iR N( R>R?R@t get_infileRBt get_outfileRGRRCRDRRR=(R9R&R'R<RUR-((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRI.s cC€sa|o:td|dtiƒt|dƒ}|ii|ƒntddtiƒti}|S(sReturns the input file objectsReading input from %sR RLsReading input from stdin(RRRRRztappendRS(R9RTR|((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR~=s cC€sa|o:td|dtiƒt|dƒ}|ii|ƒntddtiƒti}|S(sReturns the output file objectsWill write output to %sR RsWill write output to stdout(RRRRRzR€R$(R9RVR|((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRJs (RWRXRYR:R}RIR~R(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRy s     tEncryptBigfileOperationcB€s8eZdZdZdZdZdZdZdd„Z RS(s#Encrypts a file to VARBLOCK format.R1s’Encrypts a file to an encrypted VARBLOCK file. The file can be larger than the key length, but the output file is only compatible with Python-RSA.RdReRfcC€stii|||ƒS(sEncrypts files to VARBLOCK.(Rtbigfiletencrypt_bigfile(R9RUR-R)R'((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR=csN( RWRXRYRJRR^R_RCR]R=(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyRXstDecryptBigfileOperationcB€sAeZdZdZdZdZdZdZei Z dd„Z RS(s#Decrypts a file in VARBLOCK format.RhsQDecrypts an encrypted VARBLOCK file that was encrypted with pyrsa-encrypt-bigfileR2R3R4cC€stii|||ƒS(sDecrypts a VARBLOCK file.(RR‚tdecrypt_bigfile(R9RUR-R*R'((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR=tsN( RWRXRYRJRR^R_RCRRiRNR]R=(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyR„is (RYt __future__RRRZRtoptparseRRt rsa.bigfilet rsa.pkcs1tsortedtpkcs1RntkeysR/tobjectR0RcRgRjRqRyRR„RdR2RkRrRƒR…(((s+/usr/lib/python2.6/site-packages/rsa/cli.pyts.      7j8