Because of the business needs, multiple platforms (Java & PHP) between different servers need data communication, and need to encrypt communication, this aspect of the experience, what can be achieved?
Probably is a station (Java) to increase the deletion of B station (PHP) data, if the B station exposed interface to a station to use, for example, with restful mode, that requires data encryption and decryption, there is no cross-language common encryption and decryption scheme?
Reply content:
Because of the business needs, multiple platforms (Java & PHP) between different servers need data communication, and need to encrypt communication, this aspect of the experience, what can be achieved?
Probably is a station (Java) to increase the deletion of B station (PHP) data, if the B station exposed interface to a station to use, for example, with restful mode, that requires data encryption and decryption, there is no cross-language common encryption and decryption scheme?
Apache Thriftis the Facebook contribution of the cross-language call tool, incremental development will also be convenient.
If it is only used for data communication, it MessagePack is also a good choice.
A simple way to consider https+ parameter digital signatures (e.g. MD5, SHA1)
If you have a fixed IP/domain name, you can verify the IP or domain name of the source.
and head header verification.
RSA: The caller encrypts the public key with a timestamp, the decryption party decrypts with the private key, and verifies whether the timestamp timed out (time-out setting itself)
Refer to the interface design of various tripartite payment
Supplementary note: Listen to the landlord's meaning, a station and B station machine should not be deployed in the same intranet, RPC may not work
You can find an RPC framework that is tried, and now many RPC frameworks support cross-language.
RESTful seever
RPC communication can be used.
such as the Thrift framework, divided into the service side and the client, the server generates the corresponding Java code, the client introduces code, configuration, directly call the corresponding method in the code.
Here's something for you.
No need to see it.
If you like, remember to adopt!!
HTTPS + RSA Asymmetric encryption.
Hession can also