Set default password length to 32 in `get_random_password()`

This commit is contained in:
Shreya 2021-05-17 22:48:01 +05:30
parent 1d544d162a
commit 636a201d19
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
import secrets
SECRET_BYTE_LENGTH = 32
def get_random_password(length: int = 12) -> str:
def get_random_password(length: int = SECRET_BYTE_LENGTH) -> str:
password = secrets.token_urlsafe(length)
return password