Can Javascript or HTML can do encryption?


I have a html form that will allow users to fill in the form on a tablet, (e.g. iPad)

I do not want to send the data via email or over the internet.

I am aware that HTML and Javascript cannot write to disk.

What I would like to do, until Xojo supports iOS, is to put the data in an encrypted state, (it does not have to be in a very secure way, base64 or Hex, or anything like that, is quite OK), in a text area then manually copy that data to a text file and save it on the tablet.

The text file can then be transferred to a desktop or laptop for processing in my Xojo built app.

How could I do the encrption in Javascript or HTML, I am not aware that Javascript or HTML can do encryption directly? Is there a workaround?