hogni89
hogni89

Reputation: 1754

Secure socket connection

I'm working on a school project with a server application that holds centralized data, and client applications that hold cached data that will be synchronized with sockets. Everything is written in Java.

What is good practice? How can I stop people from listening to my traffic? Or prevent people to understand what is said?

Upvotes: 8

Views: 19670

Answers (2)

user207421
user207421

Reputation: 311028

SSL is the standard practice. See the javax.net.ssl package, and the JSSE Reference Guide. But this may be beyond the scope of your project or your abilities at this stage. Check with your instructor.

Upvotes: 8

RHT
RHT

Reputation: 5054

You simply use SSLSocketFactory instead of SocketFactory for your client server application. That way, the communication between the two will be totally encrypted. You can secure your client server app in less than a day, if you know basic Java. Here's a tutorial.

Upvotes: 15

Related Questions