diff --git a/src/database/add.py b/src/database/add.py index d9ab7f7..208e379 100644 --- a/src/database/add.py +++ b/src/database/add.py @@ -1,8 +1,15 @@ import mariadb -def add_master_pass(hashed_passwd: bytes, salt: bytes, con: mariadb.Connection) -> bool: - ... +def add_master_pass( + id: int, hashed_passwd: bytes, salt: bytes, con: mariadb.Connection +) -> bool: + cursor = con.cursor() + cursor.execute( + "INSERT INTO master_pass (user_id, salt, passwd) VALUES (?, ?, ?)", + [id, hashed_passwd, salt], + ) + cursor.close() def add_account(