我收到一个错误:“无法构造'Blob':迭代器getter不可调用。”我想知道如何使用CryptoJS哈希每个文件。感谢您的帮助。
document.querySelector("#actions .start").onclick = function () {
//myDropzone.enqueueFiles(myDropzone.getFilesWithStatus(Dropzone.ADDED));
console.log(myDropzone.getFilesWithStatus(Dropzone.ADDED).length);
for (i = 0; i < myDropzone.getFilesWithStatus(Dropzone.ADDED).length; i++) {
let reader = new FileReader();
var blob = new Blob(myDropzone.getFilesWithStatus(Dropzone.ADDED)[i]);
reader.readAsArrayBuffer(blob);
reader.onload = function () {
var wordarray = CryptoJS.lib.Wordarray.create(reader.result);
var hash = CryptoJS.SHA3(wordarray,{outputLength: 224}).toString();
console.log(hash);
};
}
};