def encode(self, wallet, msg): password, iv, wallet_id = self.wallets[wallet] encrypted = aes_encrypt_with_iv(password, iv, msg.encode('utf8')) return base64.b64encode(encrypted).decode()
def encode(self, account: AbstractAccount, msg): password, iv, account_id = self._accounts[account] encrypted = aes_encrypt_with_iv(password, iv, msg.encode('utf8')) return base64.b64encode(encrypted).decode()