简体   繁体   中英

Secure socket communication between PHP and C++

I have a web page communicating with a server application using sockets. Security wasn't a concern in the past but I've decided it's time to implement some. Right now the page is communicating with the server by sending strings in plain text with commands to execute on the server. What would be the best way to secure this communication so that messages aren't being sent in plain text?

I considered encrypting the messages being sent using a shared key system such as AES, but I don't have much experience working with encryption and the Google results for implementing code such as this were quite intimidating.

The server is written in Qt C++, but is specifically for Windows.

You can use OpenSSL to encrypt your information. It supports AES and SHA* algorithms, you don't need to implement them, you just have to use the library at both C and PHP applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM