mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 15:28:44 +00:00
Merge pull request #514 from PR0M3TH3AN/codex/update-pbkdf2-iteration-count-handling
Fix KDF iteration default in test profile generator
This commit is contained in:
@@ -98,6 +98,8 @@ def initialize_profile(
|
|||||||
# Store the default password hash so the profile can be opened
|
# Store the default password hash so the profile can be opened
|
||||||
hashed = bcrypt.hashpw(DEFAULT_PASSWORD.encode(), bcrypt.gensalt()).decode()
|
hashed = bcrypt.hashpw(DEFAULT_PASSWORD.encode(), bcrypt.gensalt()).decode()
|
||||||
cfg_mgr.set_password_hash(hashed)
|
cfg_mgr.set_password_hash(hashed)
|
||||||
|
# Ensure stored iterations match the PBKDF2 work factor used above
|
||||||
|
cfg_mgr.set_kdf_iterations(100_000)
|
||||||
backup_mgr = BackupManager(profile_dir, cfg_mgr)
|
backup_mgr = BackupManager(profile_dir, cfg_mgr)
|
||||||
entry_mgr = EntryManager(vault, backup_mgr)
|
entry_mgr = EntryManager(vault, backup_mgr)
|
||||||
return seed_phrase, entry_mgr, profile_dir, fingerprint, cfg_mgr
|
return seed_phrase, entry_mgr, profile_dir, fingerprint, cfg_mgr
|
||||||
@@ -146,7 +148,10 @@ def populate(entry_mgr: EntryManager, seed: str, count: int) -> None:
|
|||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Create or extend a SeedPass test profile"
|
description=(
|
||||||
|
"Create or extend a SeedPass test profile (default PBKDF2 iterations:"
|
||||||
|
" 100,000)"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--profile",
|
"--profile",
|
||||||
|
Reference in New Issue
Block a user