加密/安全通信Android应用< - > REST Web服务 [英] Encrypt/ Secure communication Android app <-> REST webservice

查看:179
本文介绍了加密/安全通信Android应用< - > REST Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创造我的Tapestry5 Android应用后端,这 HTTP://$c$c.google.com/p/t5-restful-webservices/ 插件。
该应用程序将通过调用既为注册用户REST方法与服务器进行通信(这将是很容易,以确保我猜),以及未注册的用户。
现在,我当然不希望人们只是调用从浏览器的Web服务。

I want to create a backend for my android app with Tapestry5 and this http://code.google.com/p/t5-restful-webservices/ plugin. The app will communicate with the server by calling REST methods both for registered users (that would be easy to secure I guess) as well as unregistered users. Now of course I don't want people to just call that webservice from a browser.

我怎样才能确保只有我的应用程序可以调用这个后台?

How can I make sure that only my app can make calls to this backend?

推荐答案

我能想到的方法2:

使用SSL来保护连接。 SSL可以做一个握手检查凭据。
要验证您可以使用证书或PSK用户。

Use SSL to secure the connection. SSL can do a handshake checking the credentials. To authenticate the user you can use a certificate or a PSK.

或者你可以简单地创建您的数据的哈希值(SHA或MD5),并包括一个密钥。这就是所谓的HMAC。反向工程可能让你不得不硬code将其关键原因在code。

Or you can simply create a Hash (SHA or MD5) of your data and include a key. This is called hmac. A reverse engineer may get the Key cause you have to hardcode it in your code.

这篇关于加密/安全通信Android应用< - > REST Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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