1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 17:27:31 +00:00

fix new crypto benchmarks for api change

This commit is contained in:
Thomas Waldmann 2022-03-20 14:04:18 +01:00
parent 0b5a21275f
commit 74ecb63671

View file

@ -604,9 +604,9 @@ def chunkit(chunker_name, *args, **kwargs):
if not is_libressl:
tests.extend([
("aes-256-ocb", lambda: AES256_OCB(
None, key_256, iv=key_96, header_len=1, aad_offset=1).encrypt(random_10M, header=b'X')),
key_256, iv=key_96, header_len=1, aad_offset=1).encrypt(random_10M, header=b'X')),
("chacha20-poly1305", lambda: CHACHA20_POLY1305(
None, key_256, iv=key_96, header_len=1, aad_offset=1).encrypt(random_10M, header=b'X')),
key_256, iv=key_96, header_len=1, aad_offset=1).encrypt(random_10M, header=b'X')),
])
for spec, func in tests:
print(f"{spec:<24} {size:<10} {timeit(func, number=100):.3f}s")