Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6199941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:16:45+00:00 2026-05-24T04:16:45+00:00

I have an app using HTML5 caching for an offline mode. When the app

  • 0

I have an app using HTML5 caching for an “offline mode”. When the app is offline, data is stored via javascript in localStorage to be sent to the server when the app comes back “online”. I would like to run some of this data through an encryption before sticking it in localStorage in a way that can only be decrypted on the server.

I was thinking that a public/private key would be the way to do this. Is that a reasonable way to go about things? Are there any good javascript libraries for handling this sort of thing client-side? Are there good ruby/rails libraries/gems for handling this server-side?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:16:46+00:00Added an answer on May 24, 2026 at 4:16 am

    If you only want to encrypt data in localStorage, you can use public key cryptography. Don’t generate the keys in JS, do it server side, and send the public key with the page. Unfortunately, I don’t know any well tested and maintained crypto library in Javascript.

    For the level of security you’re aiming at (just a little layer to prevent the user from reading the data), you can choose whatever implementation you want.
    On server side, you can use the OpenSSL gem with the class OpenSSL::PKey::RSA.

    For anyone else reading this: Don’t use Javascript crypto, it’s bad!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an App using UITableViews and fetching data from a server. I am
I am developing a mobile app using HTML5, Javascript, jQuery Mobile, and offline storage.
I have an have an html5 offline app. I am using the cache.manifest file
I have developed my app using core data. It works fine in the simulator.
I have made a snake game using javascript and HTML5 Canvas element. It can
I have mobile app written in HTML5 using PhoneGap. Some parts of the app
I have a html5 app for iphone using phonegap. I check for internet connection
I have an app using PHP and the PayPal API. The basic way it
I have an app using a ListView as a main screen. Each row displays
I have an app using SQLite3. It's running pretty well, but I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.