mirror of
https://github.com/anope/anope.git
synced 2026-06-12 15:44:46 +02:00
Respect BCRYPT_ROUNDS from the environment in anope-mkpasswd.
This commit is contained in:
@@ -51,7 +51,8 @@ def do_argon2(variant, password):
|
||||
return ph.hash(password)
|
||||
|
||||
def do_bcrypt(password):
|
||||
salt = bcrypt.gensalt(16)
|
||||
rounds = int(os.getenv("BCRYPT_ROUNDS", 10))
|
||||
salt = bcrypt.gensalt(rounds)
|
||||
return bcrypt.hashpw(password.encode('utf-8'), salt).decode('utf-8')
|
||||
|
||||
def do_hmac(digest, password):
|
||||
|
||||
Reference in New Issue
Block a user