(self)
| 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 -------------------") |
no test coverage detected