예제 #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 __init__(self, keypair = None):
     LiveSourceAuthConfig.__init__(self, LIVE_AUTHMETHOD_ECDSA)
     if keypair is None:
         self.keypair = permidmod.generate_keypair()
     else:
         self.keypair = keypair