Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   share a secret between java applet and c# server page (http://www.velocityreviews.com/forums/t503298-share-a-secret-between-java-applet-and-c-server-page.html)

oliviergir@gmail.com 05-01-2007 11:22 AM

share a secret between java applet and c# server page
 
Hi,
I have an applet that needs to submit some data to the server via an
http GET request onto the server (an aspx page written in C#).
The url called by the applet is going to be visible by the user but I
need to make it impossible for the user to call that page again later
with fake data (unless he decompiles the applet code..) .


What i plan to do but i am not sure at all :
I suppose that I need a secret (a private key) that will be shared by
the applet and the server code.
A unique id (ex: System.currentMillis() +ip ?) generated by the
applet , encrypted with the private key and send as a parameter "uid"
to the server.

On server side, if same uid is receive twice, request is refused.
If not, I need to make sure that uid was properly "signed" with the
private key?

what do you think of that method ?
could give me sample code to achieve that ?



All times are GMT. The time now is 02:57 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.