Streamlit_authenticator

Hello everyone, I apologize in advance for my English. I have the error code below and I can’t find a solution. Thanks in advance.
hashed_passwords = stauth.Hasher(passwords).generate()
AttributeError: ‘Hasher’ object has no attribute ‘generate’

My streamlit version = 1.42.1
My python version = 3.9.13 (I had the same problem with version 3.12)

my code:

import streamlit as st

import streamlit_authenticator as stauth

names = [‘John Smith’, ‘Rebecca Briggs’]

usernames = [‘jsmith’, ‘rbriggs’]

passwords = [‘123’, ‘456’]

hashed_passwords = stauth.Hasher(passwords).generate()
print(hashed_passwords )