2 parents 953da7f + 3faa0e4 commit c494d11Copy full SHA for c494d11
1 file changed
tools/hash-generator/worker.js
@@ -67,9 +67,9 @@ self.onmessage = function (e) {
67
function arrayBufferToWordArray(ab) {
68
const u8 = new Uint8Array(ab);
69
const len = u8.length;
70
- const words = [];
+ const words = new Array(Math.ceil(len / 4));
71
for (let i = 0; i < len; i += 4) {
72
- words.push(
+ words[i >>> 2] = (
73
(u8[i] << 24) |
74
((u8[i + 1] || 0) << 16) |
75
((u8[i + 2] || 0) << 8) |
0 commit comments