我可以加密我的JSON数据吗? [英] Can I encrypt my JSON data?

查看:115
本文介绍了我可以加密我的JSON数据吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个将从DVD本地执行的JQuery Web应用程序。该应用将读取JSON文件的所有内容。



是否有一种加密或混淆JSON内容的好方法,以便只有应用可以读取? p>

解决方案

如果你想要的是防止他们复制和粘贴到别的东西,你可以将其存储在BSON而不是JSON中。 http://bsonspec.org/#/specification



现在只有OBFUSCATES它,并且不会阻止一个知识渊博的人使用它,如果他们想。



你也可以加密它,但你还有一个类似的问题就像您将加密加密Json的javascript中的解密密钥一样。



任何真正希望您的数据的人都可以得到它。大多数浏览器都有javascript调试器,可以让您在运行时提取数据或查看数据。



所以这主要归结于你想要做多少工作很难得到一个积极主动的人,无论你做什么,都得到你的数据。


I'm developing a JQuery web app that will be executed locally from a DVD. The app will read all the contents of a JSON file.

Is there a good way to encrypt or obfuscate the JSON content so that only the app can read it?

解决方案

If all you want is to prevent them from copying and pasting into something else, you could store it in BSON instead of JSON. http://bsonspec.org/#/specification

Now that only OBFUSCATES it, and will not prevent a knowledgeable person from using it if they want to.

You could also encrypt it, but you still have a similar issue as you would be storing the decrypt key inside the javascript that loads the encrypted Json.

Anyone that really wants your data is going to be able to get it. Most browser have javascript debuggers that will let you extract, or view the data at runtime.

So it mostly comes down to how much effort you want to put into making your data difficult to get at. A significantly motivated person with get at your data no matter what you do.

这篇关于我可以加密我的JSON数据吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆