Make a KeyPair dataclass for passing around key pairs

This commit is contained in:
Alex Stokes
2019-08-13 20:23:07 -07:00
parent 329bd4eb0f
commit ad20d8cb00
5 changed files with 17 additions and 14 deletions

View File

@ -34,7 +34,8 @@ async def cleanup_done_tasks() -> None:
def generate_peer_id_from_rsa_identity() -> ID:
_, new_public_key = create_new_key_pair()
new_key_pair = create_new_key_pair()
new_public_key = new_key_pair.public_key
new_id = ID.from_pubkey(new_public_key)
return new_id