What are some alternatives to .generate() in the latest version of streamlit-authenticator?

I’m currently using this code:

import pickle

from pathlib import Path

import streamlit_authenticator as stauth

names = [“Peter Parker”, “Rebecca Miller”]

usernames = [“pparker”, “rmiller”]

passwords = [“XXX”, “XXX”]

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

file_path = Path(file).parent / “hashed_pw.pkl”

with file_path.open(“wb”) as file:

pickle.dump(hashed_passwords, file)

Apparently, I’m receiving an attribute error for .generate(), and after some research, I learned that this may have been caused because .generate() was only used in older versions of streamlit authenticator. Could someone help me fix this?