Simple Client Side Javascript Action

Hi guys,

i am wonding if there is an easy way to accomplish this.
I want to safe Passwords in a mysql Database (not for userlogin), which i need to safe encrypted, but the user have the option to see them in plain text, therefor i need to decrypt them.

I want to have a Formular on the Browser with 2 Textboxes and a save Button.
In the First Box a User enters a key and in the second the user enters the value.
When i now click the save button, the value should be encrypted (with aes) before the transfer to the server is happening.
Then i can assume, that there is never a plain-value on the way to the server.

I read in the book for client side widget and some others and i read about i have to install a clientside development environment and so on.

I there a easier way to do this, or what would be the best way ?


If you want a really secure communication, you should use https. Period.

In case you still want to do encryption with browser/JS, you’ll indeed need to do some client side development. Check out these libraries that might help you:



for sure i will use HTTPS! but i want to add the client side encryption too,
I found crypto-js too, but i didn’t figure out how i can archive the encryption before the transfer to the server.

Until know i did nothing like this in vaadin and i search for something easy like : Button.setClientClickListener(String javascript); I know thats not how it works, but i don’t know how to to it :slight_smile:


I’d do a full custom component, with GWT client side widget and connector, whose value is the encrypted data. If you don’t have GWT experience an option might want to try it with “JavaScriptComponent” approach, but I’m not that enthusiastic about that approach.


i have no experience with both of the ideas. But the GWT Custom Componets sound promising.
I will try and go with that.
Thanks a lot.