Encryption mode md5 (POST parameter (in ascending order, except the key sign parameter) + User key) PHP encryption algorithm code: [php] foreach ($ p as $ v) {$ temp = explode ("=", $ v); $ pArr [$ temp [0] = $ temp [1];} ksort ($ pArr ); foreach ($ pArr as $ k => $ v) {$ pStr2. = $ k. $ v;} md5 ($ pStr2. $ secret) Note: During encryption, the timestamp must be carried to prevent client tampering. The client sorts the parameters that need to be passed in ascending order, and then adds the key corresponding to the key (the key is saved in the server database, which cannot be made public) perform MD5 encryption and pass the parameter sign to the server. After the server obtains the sign value, it sorts the passed parameters by the same algorithm, queries the user's key to obtain the key, and then performs an encryption algorithm, the obtained server-side sign is compared with the sign passed by the client. If it is the same, it means it can be passed. If someone tampered with the data in the middle, the encrypted sign is inconsistent, which ensures the reliability and security of data transmission.