mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-05 20:51:15 -07:00
Increase PBKDF2 iterations to 600,000
OWASP Cheat Sheet recommends 600,000 iterations. https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2
This commit is contained in:
parent
c172965ec8
commit
040972bcba
1 changed files with 1 additions and 2 deletions
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import hashlib
|
|
||||||
from os import urandom
|
from os import urandom
|
||||||
from base64 import b64encode, b64decode
|
from base64 import b64encode, b64decode
|
||||||
from hashlib import pbkdf2_hmac
|
from hashlib import pbkdf2_hmac
|
||||||
|
@ -30,7 +29,7 @@ HASH_FUNCTION = 'sha256' # Must be in hashlib.
|
||||||
# Linear to the hashing time. Adjust to be high but take a reasonable
|
# Linear to the hashing time. Adjust to be high but take a reasonable
|
||||||
# amount of time on your server. Measure with:
|
# amount of time on your server. Measure with:
|
||||||
# python -m timeit -s 'import passwords as p' 'p.make_hash("something")'
|
# python -m timeit -s 'import passwords as p' 'p.make_hash("something")'
|
||||||
COST_FACTOR = 10000
|
COST_FACTOR = 600000
|
||||||
|
|
||||||
|
|
||||||
def make_hash(password):
|
def make_hash(password):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue