EncryptionTesting = { template: "#EncryptionTesting", router_path: "/EncryptionTesting", delimiters: ["[[", "]]"], props: [], data: function() { return { text: '', encrypted: '', encrypted_text: '', decrypted: '', decryption_error: '', encryption_error: '', } }, methods: { async encrypt_text (data) { try { this.encrypted = await this.encrypt(data) this.encryption_error = "" } catch (err) { this.encryption_error = "{{_('Error while encryption of message.') | escapejs}}" } }, async decrypt_text (data) { try { this.decrypted = await this.decrypt(data) this.decryption_error = "" } catch (err) { this.decryption_error = "{{_('Error while decryption of message.') | escapejs}}" } }, } }