How do I encrypt the input password in Streamlit Authentication? How to manually validate the login password and encrypt the password in the config.yaml file?

I created a custom login page without using authenticator.login(‘Login’, ‘main’). I want to compare the input text password with the password in the config.yaml file. So, I need to convert or encrypt the input text password and validate it against the stored password in the config.yaml file.