import CryptoJS from 'crypto-js';
self.onmessage = function (e) {
  const arrayBuffer = e.data;
  const wordArray = CryptoJS.lib.WordArray.create(arrayBuffer);
  const hashHex = CryptoJS.SHA256(wordArray).toString(CryptoJS.enc.hex);
  postMessage(hashHex);  // 将计算结果返回给主线程
};
