/usr/lib/python2.6/site-packages/rsa
Edit: /usr/lib/python2.6/site-packages/rsa/cli.pyc (13319B)
Ñò
|~úVc
@€ ss d Z d d k l Z l Z d d k Z d d k Z d d k l Z d d k Z d d k Z d d k
Z e e i i
i ƒ ƒ Z
d „ Z d e f d „ ƒ YZ d e f d „ ƒ YZ d
e f d „ ƒ YZ d e f d
„ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ e ƒ Z e ƒ Z e ƒ Z e ƒ Z e ƒ Z e ƒ Z d S( sW Commandline scripts.
These scripts are called by the executables defined in setup.py.
iÿÿÿÿ( t with_statementt print_functionN( t OptionParserc
C€ sR t d d d d ƒ } | i d d d d d ƒ| i d
d d d d d ƒ| i d
d d d d d d ƒ| i t i d ƒ \ } } t | ƒ d j o | i ƒ t d ƒ ‚ n y t | d ƒ } WnD t j
o8 | i ƒ t
d | d d t i ƒt d ƒ ‚ n Xt
d | d t i ƒt i
| ƒ \ } } | i oo t
d | i d t i ƒ| i d | i ƒ } t | i d ƒ i i ƒ } z | ~ } | i | ƒ Wd QXn | i d | i ƒ } | i oZ t
d | i d t i ƒt | i d ƒ i i ƒ } z | ~ } | i | ƒ Wd QXn$ t
d d t i ƒt i i | ƒ d S( s Key generator.t usages usage: %prog [options] keysizet descriptions. Generates a new RSA keypair of "keysize" bits.s --puboutt typet stringt helpsž 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 --forms7 key format of the private and public keys - default PEMt choicest PEMt DERt defaulti i s Not a valid number: %st files Generating %i-bit keys Writing public key to %st formatt wbNs Writing private key to %ss Writing private key to stdout( R R
( R t
add_optiont
parse_argst syst argvt lent
print_helpt
SystemExitt intt
ValueErrort printt stderrt rsat newkeyst puboutt
save_pkcs1t formt opent __exit__t __enter__t writet outt stdout(
t parsert clit cli_argst keysizet pub_keyt priv_keyt datat _[1]t outfilet _[2]( ( s+ /usr/lib/python2.6/site-packages/rsa/cli.pyt keygen# sB
)
)t CryptoOperationc B€ s§ e Z d Z e i Z d Z d Z d Z d Z
d Z d Z d Z
d Z d Z e Z e i Z d „ Z e i d d
„ ƒ Z d „ Z d „ Z d
„ Z d „ Z d „ Z RS( s9 CLI callable that operates with input, output, and a key.t publics' usage: %%prog [options] %(keyname)s_keyt decryptt decryptedt
decryptingsE Name of the file to %(operation)s. Reads from stdin if not specified.sj Name of the file to write the %(operation_past)s file to. Written to stdout if this option is not present.i c C€ sF | i | i i | _ | i | i i | _ | i | i i | _ d S( N( R t __class__t __dict__t
input_helpt output_help( t self( ( s+ /usr/lib/python2.6/site-packages/rsa/cli.pyt __init__n s c C€ s d S( s€ Performs the program's operation.
Implement in a subclass.
:returns: the data to write to the output.
N( ( R9 t indatat keyR' ( ( s+ /usr/lib/python2.6/site-packages/rsa/cli.pyt perform_operations s c C€ s“ | i ƒ \ } } | i | d | i ƒ } | i | i ƒ } t | i i ƒ d t i ƒ| i
| | | ƒ } | i o | i | | i
ƒ n d S( s Runs the program.i R N( t parse_clit read_keyt keyformt read_infilet inputR t operation_progressivet titleR R R= t
has_outputt
write_outfilet output( R9 R&