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

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)
Object interface to BIO_s_mem. 

Empirical testing suggests that this class performs less well than cStringIO, 
because cStringIO is implemented in C, whereas this class is implemented in 
Python. Thus, the recommended practice is to use cStringIO for regular work and 
convert said cStringIO object to a MemoryBuffer object only when necessary.

src/m/2/M2Crypto-0.22.3/M2Crypto/SMIME.py   M2Crypto(Download)
def text_crlf(text):
    bio_in = BIO.MemoryBuffer(text)
    bio_out = BIO.MemoryBuffer()
    if m2.smime_crlf_copy(bio_in._ptr(), bio_out._ptr()):
        return bio_out.read()
def text_crlf_bio(bio_in):
    bio_out = BIO.MemoryBuffer()
    if m2.smime_crlf_copy(bio_in._ptr(), bio_out._ptr()):
        return bio_out
    else:

src/m/2/M2Crypto-HEAD/M2Crypto/SMIME.py   M2Crypto(Download)
def text_crlf(text):
    bio_in = BIO.MemoryBuffer(text)
    bio_out = BIO.MemoryBuffer()
    if m2.smime_crlf_copy(bio_in._ptr(), bio_out._ptr()):
        return bio_out.read()
def text_crlf_bio(bio_in):
    bio_out = BIO.MemoryBuffer()
    if m2.smime_crlf_copy(bio_in._ptr(), bio_out._ptr()):
        return bio_out
    else:

src/m/2/M2Crypto-0.22.3/M2Crypto/ASN1.py   M2Crypto(Download)
    def __str__(self):
        buf = BIO.MemoryBuffer()
        m2.asn1_string_print( buf.bio_ptr(), self.asn1str )
        return buf.read_all()
 
    def as_text(self, flags=0):
        buf = BIO.MemoryBuffer()
        m2.asn1_string_print_ex( buf.bio_ptr(), self.asn1str, flags)
        return buf.read_all()
 
    def __str__(self):
        assert m2.asn1_utctime_type_check(self.asn1_utctime), "'asn1_utctime' type error'"
        buf = BIO.MemoryBuffer()
        m2.asn1_utctime_print( buf.bio_ptr(), self.asn1_utctime )
        return buf.read_all()

src/m/2/M2Crypto-HEAD/M2Crypto/ASN1.py   M2Crypto(Download)
    def __str__(self):
        buf = BIO.MemoryBuffer()
        m2.asn1_string_print( buf.bio_ptr(), self.asn1str )
        return buf.read_all()
 
    def as_text(self, flags=0):
        buf = BIO.MemoryBuffer()
        m2.asn1_string_print_ex( buf.bio_ptr(), self.asn1str, flags)
        return buf.read_all()
 
    def __str__(self):
        assert m2.asn1_utctime_type_check(self.asn1_utctime), "'asn1_utctime' type error'"
        buf = BIO.MemoryBuffer()
        m2.asn1_utctime_print( buf.bio_ptr(), self.asn1_utctime )
        return buf.read_all()

src/m/2/M2Crypto-0.22.3/M2Crypto/Err.py   M2Crypto(Download)
def get_error():
    err=BIO.MemoryBuffer()
    m2.err_print_errors(err.bio_ptr())
    return err.getvalue()
 

src/m/2/M2Crypto-HEAD/M2Crypto/Err.py   M2Crypto(Download)
def get_error():
    err=BIO.MemoryBuffer()
    m2.err_print_errors(err.bio_ptr())
    return err.getvalue()