Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/m/i/mixminion-HEAD/lib/mixminion/benchmark.py   mixminion(Download)
     waitForChildren, formatBase64, Lockfile
from mixminion.Crypto import *
from mixminion.Crypto import OAEP_PARAMETER
from mixminion.Crypto import _add_oaep_padding, _check_oaep_padding
from mixminion.Packet import SMTP_TYPE, CompressedDataTooLong, IPV4Info
def rsaTiming():
    c = AESCounterPRNG()
    if hasattr(_ml, 'add_oaep_padding'):
        print "OAEP_add (70->128B) (C)",
        print timeit((lambda: _ml.add_oaep_padding(s70b,OAEP_PARAMETER,128)),
        r = _ml.add_oaep_padding(s70b, OAEP_PARAMETER,128)
        print "OAEP_check (128B->70B) (C)",
        print timeit((lambda r=r:
    print "OAEP_add (70->128B) (native python)",
    print timeit((lambda c=c: _add_oaep_padding(s70b,OAEP_PARAMETER,128,c)),
    r = _add_oaep_padding(s70b, OAEP_PARAMETER,128,c)

src/m/i/mixminion-HEAD/lib/mixminion/testSupport.py   mixminion(Download)
    assert pk1.get_modulus_bytes() == 256
    enc = mixminion.Crypto._add_oaep_padding(s,
    print "   Padded string (2048 bits):",hexStr(enc)
    pkenc = pk1.crypt(enc,1,1)

src/m/i/mixminion-HEAD/lib/mixminion/test.py   mixminion(Download)
        eq(msg, _ml.check_oaep_padding(
                    k512.crypt(pk_encrypt(msg,k512), 0, 0),
                    Crypto.OAEP_PARAMETER, 64))
        # test signing