I am about to start a contract with a company and they need their data which I will be sending via sockets to be securely transferred from their Android device to a Java server. To do so I am going to put data from a form into an XML document, cypher it, then send it over the internet to a cloud server through Sockets.
My question: What is the most secure way to use Sockets to send data?
I've found SSLSocketFactory
but I don't really understand what it's doing and seings though I have little experience in security I was wondering..
Is SSLSocketFactory
the proper aproach? Is there a better way to have a secure connection between a client and a host over a socket?