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

Function aes_encrypt

plugin/app/utils.py:38–43  ·  view source on GitHub ↗
(plain_text: str)

Source from the content-addressed store, hash-verified

36
37
38def aes_encrypt(plain_text: str):
39 cipher = AES.new(AES_ENCRYPTION_KEY_BYTES, AES.MODE_CBC)
40 ct_bytes = cipher.encrypt(pad(plain_text.encode(), AES.block_size))
41 iv = b64encode(cipher.iv).decode("utf-8")
42 ct = b64encode(ct_bytes).decode("utf-8")
43 return f"{iv},{ct}"
44
45
46def aes_decrypt(encrypted_text: str):

Callers 1

encryptMethod · 0.90

Calls 3

encryptMethod · 0.45
encodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected