Hash large files with crypto.subtle.digest(“SHA-256”, buffer)
问题 i have developed a web application where a user can select multiple files via a input field. Then the sha-256 checksums are calculated by the following code. The code (taken from developer.mozilla.org) only works for small files. What do I have to change to handle large files (e.g. 1GB+) too? function sha256(buffer){ return crypto.subtle.digest("SHA-256", buffer).then(function (hash) { return hex(hash); }); } function hex(buffer) { var hexCodes = []; var view = new DataView(buffer); for (var