Coverage for confy_addons/core/abstract.py: 100%
6 statements
« prev ^ index » next coverage.py v7.10.7, created at 2026-02-20 18:19 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2026-02-20 18:19 +0000
1"""Abstract base class for encryption handlers.
3This module defines an abstract base class that specifies the interface
4for encryption handlers. Any concrete encryption handler must implement
5the methods defined in this abstract base class.
6"""
8from abc import ABC, abstractmethod
11class AESEncryptionABC(ABC):
12 """Abstract base class for encryption handlers.
14 This class defines the interface for encryption handlers, requiring
15 implementation of encryption and decryption methods.
16 """
18 @abstractmethod
19 def encrypt(self, plaintext: str) -> str:
20 """Encrypts the given plaintext string.
22 Args:
23 plaintext (str): The text to be encrypted.
25 Returns:
26 str: The encrypted text as a string.
28 """
29 pass # pragma: no cover
31 @abstractmethod
32 def decrypt(self, ciphertext: str) -> str:
33 """Decrypts the given ciphertext string.
35 Args:
36 ciphertext (str): The text to be decrypted.
38 Returns:
39 str: The decrypted text as a string.
41 """
42 pass # pragma: no cover