Island: Remove dependency from ILockableEncryptor -> IEncryptor

ILockableEncryptor adds additional constraints on when encrypt() or
decrypt() can be used. If ILockableEncryptor inherits from IEncryptor,
it will violate the Liskov Substitution Principle
This commit is contained in:
Mike Salvatore 2022-07-11 15:07:16 -04:00
parent d6655a8e2c
commit 75f3fb02ee
1 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,4 @@
from abc import abstractmethod
from . import IEncryptor
from abc import ABC, abstractmethod
# NOTE: The ILockableEncryptor introduces temporal coupling, that is, you must first unlock the
# encryptor before you can use it. This is because the key material used to encrypt repository
@ -33,7 +31,7 @@ class ResetKeyError(Exception):
"""
class ILockableEncryptor(IEncryptor):
class ILockableEncryptor(ABC):
"""
An encryptor that can be locked or unlocked.