Merge "Cache fernet keys when encrypting or decrypting"

This commit is contained in:
Zuul 2021-02-22 17:13:53 +00:00 committed by Gerrit Code Review
commit 753517c419
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@
# limitations under the License.
import base64
from functools import lru_cache
import logging
from cryptography import fernet
@ -105,6 +106,7 @@ def decrypt(
raise
@lru_cache(maxsize=None)
def _generate_key(passphrase, salt, key_length, iterations):
"""
Use the passphrase and salt and PBKDF2HMAC key derivation algorithm,