feat: encrypt org auth tokens with AES (#3104)

This commit is contained in:
LawyZheng
2025-08-05 12:36:24 +08:00
committed by GitHub
parent 977c9d4f13
commit 02576e5be3
8 changed files with 192 additions and 9 deletions

View File

@@ -0,0 +1,20 @@
from abc import ABC, abstractmethod
from enum import Enum
class EncryptMethod(Enum):
AES = "aes"
class BaseEncryptor(ABC):
@abstractmethod
def method(self) -> EncryptMethod:
pass
@abstractmethod
async def encrypt(self, plaintext: str) -> str:
pass
@abstractmethod
async def decrypt(self, ciphertext: str) -> str:
pass