fix: 管理员默认口令改为六位默认值
This commit is contained in:
@@ -10,7 +10,8 @@ _N = 2**14
|
||||
_R = 8
|
||||
_P = 1
|
||||
_PREFIX = "scrypt$"
|
||||
_LEGACY_PASSWORD = "242520"
|
||||
_DEFAULT_PASSWORD = "242520"
|
||||
_MIN_LENGTH = 6
|
||||
|
||||
|
||||
def hash_password(password: str) -> str:
|
||||
@@ -34,5 +35,9 @@ def is_hashed(stored: str) -> bool:
|
||||
return stored.startswith(_PREFIX)
|
||||
|
||||
|
||||
def legacy_password() -> str:
|
||||
return _LEGACY_PASSWORD
|
||||
def default_password() -> str:
|
||||
return _DEFAULT_PASSWORD
|
||||
|
||||
|
||||
def min_length() -> int:
|
||||
return _MIN_LENGTH
|
||||
|
||||
Reference in New Issue
Block a user