Message encryption transmission
background information
Message Service MNS The domain name of the HTTPS service is provided. You can select the HTTPS service address. Encrypt the transmitted message body at the client to prevent theft.
matters needing attention
Encrypting and decrypting messages will have some impact on performance. Please do not send non encrypted messages to the encrypted queue.
Solution
Encrypt the message at the sending end before sending it. The message is decrypted at the message receiving end, and then consumed.
SeurityQueue.java provide putMessage 、 popMessage and deleteMessage Interface. The interface description is as follows: putMessage Before sending a message to the server, encrypt the message body according to the specified key and encryption algorithm. popMessage After receiving the server side message, first decrypt it in the specified way, and then return the decrypted message body.
SecurityKeyGenerator.java Used to generate encryption and decryption required secretKey 。 SecurityQueueDemo.java The Demo program that provides how to use the SecurityQueue.
-
Introduction to this page (1)