Skip to content

Commit

Permalink
slots
Browse files Browse the repository at this point in the history
  • Loading branch information
arunanshub committed Feb 24, 2021
1 parent f18b409 commit cddfcd7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pyflocker/ciphers/backends/cryptography_/AES.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)]
Expand Down

0 comments on commit cddfcd7

Please sign in to comment.