The problem of using md5 encryption in vue

this problem has arisen recently that I use js-md5 to encrypt url and always mismatch the backend java and then report it wrong for a long time. I don"t know why it is because there is Chinese
in the request parameters, but the strange thing is that I do not report a dozen packets in the local tuning interface and then send a dozen packets to the server and then adjust the interface to report the error. Am I using the wrong parameters? I connect the parameters with a vertical bar. After that, you can just call the md5 method to encrypt. This problem has not occurred before
import md5 from "js-md5"

.

for (let key of params.keys ()) {

    if(key != "file1" && key != "file2" && key != "fileList" ) {
      a[a.length] = key;
    }

}
a.sort();
for (var i = 0; i < a.length; iPP) {
  sign += params.get(a[i]) + "|";
}
sign = sign + encodekey;
console.log(sign)
return md5(sign);// url
Jul.12,2021

Hello, landlord! For development mode and production mode, the processing of js lies in the compression confusion of the latter, so we can check it out from this way of thinking. To keep the dependency package of md5 unprocessed and consistent with the development pattern, you can give it a try. I hope it helps!

Menu