cryptography/tests/bench/test_fernet.py
Alex Gaynor f3b0e165f0
Added a benchmark for fernet (#11088)
This tests many different primitives
2024-06-08 07:52:13 -07:00

10 lines
343 B
Python

# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from cryptography import fernet
def test_fernet_encrypt(benchmark):
f = fernet.Fernet(fernet.Fernet.generate_key())
benchmark(f.encrypt, b"\x00" * 256)