Gojo
Gojo
HHomarr
Created by Gojo on 3/14/2024 in #💬・get-help
Issue with python password encryption
so i am trying to create a user using python directly entering a user enter into db but on that my auth fails
salt = bcrypt.gensalt(10)
hashed_password = bcrypt.hashpw(password.encode('utf-8'), salt)
user_id = uuid.uuid4()
cursor.execute('''INSERT INTO users (id, name, email, password, salt, isAdmin, isOwner)VALUES (?, ?, ?, ?, ?, ?, ?)''',(user_id, username, None, hashed_password, salt, True, True))
salt = bcrypt.gensalt(10)
hashed_password = bcrypt.hashpw(password.encode('utf-8'), salt)
user_id = uuid.uuid4()
cursor.execute('''INSERT INTO users (id, name, email, password, salt, isAdmin, isOwner)VALUES (?, ?, ?, ?, ?, ?, ?)''',(user_id, username, None, hashed_password, salt, True, True))
This how my code looks like is not possible to hash password via python i think hashing is correct but docker logs show no error what reason of fail auth hope you can point me to right direction. 🙂
42 replies
HHomarr
Created by Gojo on 3/2/2024 in #💬・get-help
What encryption is being used to encrypt the password
Hey devs, I am trying to create my own installer in python to install homarr i have question what encryption method is being used to encrypt the password and how salt is decided while encryption ? Thank you
7 replies