& Quot; functionmymd5 ($ string, $ action & quot; EN & quot;) {string encryption and decryption global $ webdb, $ onlineip; $ some configuration information of the webdb system, $ onlineip client ip this function does not seem to use $ secret_string $ webdb [mymd5]. & #39; 5 * j ,. ^ & amp ;;?. % #@! & #39; top secret string. you can set $ webdb [mymd5] as needed. you can set a string if ($ string phpc #
Function mymd5 ($ string, $ action = "EN") {// string encryption and decryption global $ webdb, $ onlineip; // Some configuration information of the webdb system, $ onlineip client ip does not seem to use this function $ secret_string = $ webdb [mymd5]. '5 * j ,. ^ &;?. % #@! '; // Top secret string, which can be set at will // $ webdb [mymd5] you can set a string if ($ string = "") return ""; if ($ action = "EN") $ md5code = substr (md5 ($ string), 8, 10); // The action is encrypted, the 8-to 10-character else of the MD5 code in plaintext is decrypted (DE) {$ md5code = substr ($ string,-10 ); // take the last 10 characters of $ string = substr ($ string, 0, strlen ($ string)-10 ); // remove the last 10 characters of $ string} $ key = md5 ($ md5code. $ secret_string); // key $ string = ($ action = "EN "? $ String: base64_decode ($ string); // if the operation is decryption, perform MIME base64 decoding on the string to be decrypted. $ len = strlen ($ key); $ code = ""; for ($ I = 0; $ I