Пример #1
0
def generate_cs_keypair(keypair_filename = None, pubkey_filename = None):
    keypair = permid.generate_keypair()
    if keypair_filename:
        permid.save_keypair(keypair, keypair_filename)
    pubkey = encodestring(str(keypair.pub().get_der())).replace('\n', '')
    if pubkey_filename:
        permid.save_pub_key(keypair, pubkey_filename)
    return (keypair, pubkey)
Пример #2
0
def generate_cs_keypair(keypair_filename=None, pubkey_filename=None):
    keypair = permid.generate_keypair()
    if keypair_filename:
        permid.save_keypair(keypair, keypair_filename)
    pubkey = encodestring(str(keypair.pub().get_der())).replace('\n', '')
    if pubkey_filename:
        permid.save_pub_key(keypair, pubkey_filename)
    return (keypair, pubkey)
Пример #3
0
 def save(self, filename):
     permidmod.save_keypair(self.keypair, filename)