示例#1
0
文件: EC.py 项目: rodrigc/m2crypto
def load_key_bio(bio, callback=util.passphrase_callback):
    """
    Factory function that instantiates a EC object.

    @param bio: M2Crypto.BIO object that contains the PEM
    representation of the EC key pair.

    @param callback: Python callback object that will be invoked
    if the EC key pair is passphrase-protected.
    """
    return EC(m2.ec_key_read_bio(bio._ptr(), callback), 1)
示例#2
0
def load_key_bio(bio, callback=util.passphrase_callback):
    """
    Factory function that instantiates a EC object.

    @param bio: M2Crypto.BIO object that contains the PEM
    representation of the EC key pair.

    @param callback: Python callback object that will be invoked
    if the EC key pair is passphrase-protected.
    """
    return EC(m2.ec_key_read_bio(bio._ptr(), callback), 1)