Hello!
I am kind of stuck in this phase: I cannot prehash passwords using guides found in different blog -posts. Can you give me some link to working how to -which works. I have version Streamlit, version 1.28.2 … Thanks in advance !
Hello!
I am kind of stuck in this phase: I cannot prehash passwords using guides found in different blog -posts. Can you give me some link to working how to -which works. I have version Streamlit, version 1.28.2 … Thanks in advance !
Hi @petri, welcome to the forum!
Can you share a bit more about:
If you’re looking for the way streamlit-authenticator does it, it works like this (see Streamlit-Authenticator/streamlit_authenticator/utilities/hasher.py at main · mkhorasani/Streamlit-Authenticator · GitHub):
import streamlit as st
from datetime import datetime
import bcrypt
password = st.text_input("Password", type="password")
hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
st.write("Hashed:")
st.text(hashed)
You can see it in action here:
Hello and thank you very much ! Yes I use streamlit_auth … and it’s quite slow If passwords are not prehashed and that’s why I search solution for that. I try your method and hope it helps !
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.