From cddfcd786702cbdd0b779558714e3c97ee8f5862 Mon Sep 17 00:00:00 2001 From: Arunanshu Biswas Date: Wed, 24 Feb 2021 17:26:39 +0530 Subject: [PATCH] slots --- pyflocker/ciphers/backends/cryptography_/AES.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pyflocker/ciphers/backends/cryptography_/AES.py b/pyflocker/ciphers/backends/cryptography_/AES.py index 17870746..ad258f38 100644 --- a/pyflocker/ciphers/backends/cryptography_/AES.py +++ b/pyflocker/ciphers/backends/cryptography_/AES.py @@ -145,6 +145,8 @@ def calculate_tag(self): class _AuthWrapper: """Wrapper class for objects that do not support memoryview objects.""" + __slots__ = ("_auth",) + def __init__(self, auth): self._auth = auth @@ -158,6 +160,17 @@ def __getattr__(self, name): class _EAX: """AES-EAX adapter for pyca/cryptography.""" + __slots__ = ( + "_mac_len", + "_omac", + "_auth", + "_omac_cache", + "_cipher", + "_updated", + "__ctx", + "__tag", + ) + def __init__(self, key, nonce, mac_len=16): self._mac_len = mac_len self._omac = [cmac.CMAC(algo.AES(key), defb()) for i in range(3)]