angular-md5 icon indicating copy to clipboard operation
angular-md5 copied to clipboard

encrypt not the same with backend use java,did any params about encoding pass to md5.createHash function

Open dribehance opened this issue 8 years ago • 1 comments

hi,i use the lib to encrypt my request param to server ,but when it come to chinese ,the result is not the same with the backend use java md5

dribehance avatar Nov 25 '16 06:11 dribehance

Currently, the md5.createHash() method in angular-md5 forces the content to lowercase before hashing. I think this is a cut and paste error from using the Gravatar API.

See https://github.com/gdi2290/angular-md5/pull/15 for an outstanding pull request.

Some options for you.

  1. Manually patch your angular-md5.js / angular-md5.min.js.
  2. Lower case your strings before calling the java md5.

If you do try step 2 and the code starts working correctly, I'd try step 1 and not step 2.

I'm not the author of this project, just another user.

rquadling avatar Nov 25 '16 18:11 rquadling