forked from p15670423/monkey
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:
parent
d6655a8e2c
commit
75f3fb02ee
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue