forked from mtusi2026/mtusi2026lab7
8 lines
375 B
Python
8 lines
375 B
Python
"""Verify the configured Argon2id cost parameters."""
|
|
from app.services.user_service import password_hasher
|
|
|
|
sample = password_hasher.hash("Lab7-test-password-only")
|
|
assert sample.startswith("$argon2id$v=19$m=19456,t=2,p=1$"), sample
|
|
assert password_hasher.verify("Lab7-test-password-only", sample)
|
|
print("PASS: Argon2id m=19456 KiB, t=2, p=1; salt is embedded in PHC hash")
|