fixed key loading and logout func

This commit is contained in:
Spekulaas 2023-10-25 13:47:24 +02:00
parent 826999e229
commit dabea47437

View File

@ -17,10 +17,10 @@ class User:
# check if user exists
if user:
private_key, public_key = Signature.bytes_to_keys(user['private_key'], user['public_key'])
private_key, public_key = Signature.bytes_to_keys(user[0], user[1])
self.private_key = private_key
self.public_key = public_key
self.username = user['username']
self.username = user[2]
return True
return False
@ -44,9 +44,7 @@ class User:
return False
def logout(self):
self.db.close()
self.private_key = None
self.public_key = None
self.username = None
self.password = None
return True