From 6701d2859b2f9f1d87b19d2c4dd10d66f4048df6 Mon Sep 17 00:00:00 2001 From: erselbey Date: Sat, 28 Jun 2025 17:35:46 +0300 Subject: [PATCH] Update basic-auth.md Signed-off-by: erselbey --- docs/guides/basic-auth.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/guides/basic-auth.md b/docs/guides/basic-auth.md index abc96377c..cb8bc4898 100644 --- a/docs/guides/basic-auth.md +++ b/docs/guides/basic-auth.md @@ -22,11 +22,16 @@ web](https://bcrypt-generator.com/). Here is a python script which uses python3-bcrypt to prompt for a password and hash it: +``` +pip3 install getpass4 +``` + ```python -import getpass +#!/usr/local/bin/python3 +from getpass4 import getpass import bcrypt -password = getpass.getpass("password: ") +password = getpass("password: ") hashed_password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt()) print(hashed_password.decode()) ```