Search code examples
javasocketsencryptionencryption-symmetric

Implementing simple symmetric encryption using java sockets


I am writing a peer to peer application and I want to implement simple symmetric encryption.

I'm looking for a good example of how to do this, I don't mind which library it uses so long as it's free.

Preferably all the encryption would happen at the socket layer so I wouldn't need to change my code at all.

Can someone provide such an example?


Solution

  • Java already comes with SSL Sockets. There is no need to manually implement the encryption. The socket handles everything on its own.