js-md5
js-md5 copied to clipboard
Wrong result with file size between 2G and 4G
Hello,
When I calc a file of 2,369,284,818 bytes, I got a different result from other md5 tools.
I changed line 338 of md5.js from
blocks[15] = this.hBytes << 3 | this.bytes >> 29;
to
blocks[15] = this.hBytes << 3 | (this.bytes >> 29 & 7);
then all is OK. And more, when I calc "2369284818 >> 29" in my chrome browser, I got "-4", not "4"
thanks for report. mistake to use >>
, should be >>>
. v0.7.3 fixed this.