mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 09:59:19 -04:00
Merge pull request #6552 from hexagonrecursion/cpu
Argon2 fourth part: borg benchmark cpu: use ARGON2_ARGS
This commit is contained in:
commit
7d33ad3db1
2 changed files with 1 additions and 3 deletions
|
|
@ -1,7 +1,5 @@
|
|||
from packaging.version import parse as parse_version
|
||||
|
||||
# IMPORTANT keep imports from borg here to a minimum because our testsuite depends on
|
||||
# being able to import borg.constants and then monkey patching borg.constants.PBKDF2_ITERATIONS
|
||||
from ._version import version as __version__
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ class Archiver:
|
|||
count = 5
|
||||
for spec, func in [
|
||||
("pbkdf2", lambda: Passphrase('mypassphrase').kdf(b'salt'*8, PBKDF2_ITERATIONS, 32)),
|
||||
("argon2", lambda: Passphrase('mypassphrase').argon2(32, b'salt'*8, 3, 65536, 1, 'id')),
|
||||
("argon2", lambda: Passphrase('mypassphrase').argon2(64, b'S' * ARGON2_SALT_BYTES, **ARGON2_ARGS)),
|
||||
]:
|
||||
print(f"{spec:<24} {count:<10} {timeit(func, number=count):.3f}s")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue