javascript-last.fm-api icon indicating copy to clipboard operation
javascript-last.fm-api copied to clipboard

the MD5 lib not work proper on non-Latin characters

Open dasudiy opened this issue 14 years ago • 1 comments

e.g. md5 of Chinese word '你好' should be 7ECA689F0D3389D9DEA66AE112E5CFD7 but current caculated is 52a90a58a24523da1b9d09124b1f3861

dasudiy avatar Nov 12 '10 09:11 dasudiy

This tripped me up as well. Anyone who wants a replacement md5 function with works with UTF-8 characters should replace this with:

http://www.webtoolkit.info/javascript-md5.html

Works perfectly! Change the function name to lowercase md5 and it's a drop in replacement

matt-oakes avatar Nov 14 '11 22:11 matt-oakes