The invention provides a method, a
system and a medium for realizing unified
encryption, decryption and desensitization of data across terminals, request and response data are encrypted through a 32-bit random
password generated by a front end, and the
password is stored in a session. And the front end encrypts the random
password by using the RSA public key provided by the rear end, and sends the random password to the rear end through the HTTP request header. And after receiving the request, the rear end decrypts the random password by using the RSA private key, and encrypts and decrypts request data by using an AESGCM
algorithm. The data between the front end and the rear end is always kept in an encrypted state in a transmission process, and the front end performs desensitization
processing on the returned sensitive data according to service requirements, so that the
data security is ensured. According to the method provided by the invention, multiple terminals (such as Web, mobile terminals and the like) are supported to uniformly call
encryption, decryption and desensitization functions, repeated development on different platforms is avoided, and the development efficiency is improved.