使用 Android LVL 将自定义字段添加到许可证检查请求
我正在使用 Google 提供的 LVL 来使用 Android Market 许可服务。
我想缓存服务器响应,但不想使用模糊的 SharedPreference
文件来存储许可证数据,因为我担心安全存储密钥。我只是希望能够将加密的响应转储到 SharedPreference 文件,以便其他人无法篡改它。如果他们可以查看就可以了。
现在,显然有一些参数不属于服务器响应的一部分。例如,应用程序重试的次数。我想将其与响应一起存储。
有什么方法可以将一些自定义数据附加到许可证请求中,以便服务器在加密后用响应回显它? (也许作为一个额外的字段)。
服务器是否会附加我可能随请求一起发送的任何自定义数据?
I am using the LVL provided by Google to use the Android Market Licensing Service.
I want to cache the server response but I do not want to use an obfuscated SharedPreference
file to store license data because I have concerns about storing the key securely. I just want to be able to dump the encrypted response to a SharedPreference
file so that nobody else can tamper with it. It is OK if they can view it.
Now, there are obviously some parameters that are not part of the server response. For example, the number of retries the app has made. I want to store that along with the response.
Is there any way I can append some custom data to the license request so that the server echos it back with the response after encrypting it? (Maybe as an extra field).
Will the server append any custom data I might send along with the request?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,如果您使用默认的服务器托管策略,则需要进行混淆,因为 ServerManagedPolicy 的第二个参数是混淆。然后,该文件会转储到应用程序的shared_prefs 目录中。
老实说,我不太确定你在这里想做什么,如果用户有权访问文件,他们肯定可以篡改它。如果您担心安全存储密钥,为什么要禁用混淆?
另外,我非常怀疑您是否可以从许可服务器获得“自定义”响应,如果我错了,请有人纠正我。
It is my understanding that if you're using the default Server Managed Policy, you will be required to obfuscate because the second parameter of ServerManagedPolicy is obfuscation. This file is then dumped to the shared_prefs directory of your app.
To be honest I'm not really sure what you're trying to do here, if a user has access to a file, they can certainly tamper with it. If you have concerns about storing the key securely, why would you want to disable obfuscation?
Also, I highly doubt you could obtain "custom" responses from the licensing server, someone please correct me if I'm wrong.