(self, text)
| 58 | self.cipher = AesEcbCipher(key) |
| 59 | |
| 60 | def _encrypt(self, text): |
| 61 | text = to_binary(text) |
| 62 | text = PKCS7Encoder.encode(text) |
| 63 | |
| 64 | ciphertext = to_binary(self.cipher.encrypt(text)) |
| 65 | return base64.b64encode(ciphertext) |
| 66 | |
| 67 | def _decrypt(self, text, exception=None): |
| 68 | text = to_binary(text) |