mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 07:06:30 +00:00
Update utils.py
This commit is contained in:
parent
b8c50fee36
commit
0e2e588145
@ -19,9 +19,9 @@ def password_for_validating(password):
|
|||||||
for _ in range(100):
|
for _ in range(100):
|
||||||
password = hashlib.sha256(password.encode()).hexdigest()
|
password = hashlib.sha256(password.encode()).hexdigest()
|
||||||
try:
|
try:
|
||||||
return int(str(sum(map(int, RE_DIGITS.findall(password))))[0])
|
return str(sum(map(int, RE_DIGITS.findall(password))))[0]
|
||||||
except (ValueError, IndexError):
|
except (ValueError, IndexError):
|
||||||
return 0
|
return "0"
|
||||||
|
|
||||||
|
|
||||||
def key_to_iv(key):
|
def key_to_iv(key):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user