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

Method encrypt

backend/app/models/tool/authentication.py:62–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 return self.encrypted or self.type == ActionAuthenticationType.none
61
62 def encrypt(self):
63 # logger.debug("------------------- Encryption Start -------------------")
64 # logger.debug(f"Before encryption: {self.model_dump_json()}")
65
66 if self.encrypted or self.type == ActionAuthenticationType.none:
67 return
68 if self.secret is not None:
69 self.secret = aes_encrypt(self.secret)
70 if self.content is not None:
71 for key in self.content:
72 self.content[key] = aes_encrypt(self.content[key])
73 self.encrypted = True
74
75 # logger.debug(f"After encryption: {self.model_dump_json()}")
76 # logger.debug("------------------- Encryption End -------------------")
77
78 def decrypt(self):
79 # logger.debug("------------------- Decryption Start -------------------")

Callers 3

aes_encryptFunction · 0.45
validateMethod · 0.45
validateMethod · 0.45

Calls 1

aes_encryptFunction · 0.90

Tested by

no test coverage detected