How to calculate md5 checksum of blob using CryptoJS
问题 Uploading file in chunks using Blob API. Here I want to check the md5 checksum of the blob. When I tried the below code it is working fine for text files, but it is returning different value for binary files. var reader = new FileReader(); reader.readAsBinaryString(blob); reader.onloadend = function () { var mdsum = CryptoJS.MD5(reader.result); console.log("MD5 Checksum",mdsum.toString()); }; How to calculate the md5 checksum of blob correctly for all types of files ? 回答1: Use the following