MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / aes_decrypt

Function aes_decrypt

plugin/app/utils.py:46–54  ·  view source on GitHub ↗
(encrypted_text: str)

Source from the content-addressed store, hash-verified

44
45
46def aes_decrypt(encrypted_text: str):
47 if encrypted_text is None or "," not in encrypted_text:
48 return None
49 iv, ct = encrypted_text.split(",", 1)
50 iv = b64decode(iv)
51 ct = b64decode(ct)
52 cipher = AES.new(AES_ENCRYPTION_KEY_BYTES, AES.MODE_CBC, iv)
53 pt = unpad(cipher.decrypt(ct), AES.block_size)
54 return pt.decode("utf-8")
55
56
57async def handle_response(response):

Callers 1

decryptMethod · 0.90

Calls 2

decryptMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected