src/utils/crypto.js
function SHA256(msgBytes) {
  let shaObj = new jsSHA("SHA-256", "HEX");
  let msgHex = byteArray2hexStr(msgBytes);
  shaObj.update(msgHex);
  let hashHex = shaObj.getHash("HEX");
  return hexStr2byteArray(hashHex);
}
function SHA256(msgBytes) {
  let shaObj = new jsSHA("SHA-256", "HEX");
  let msgHex = byteArray2hexStr(msgBytes);
  shaObj.update(msgHex);
  let hashHex = shaObj.getHash("HEX");
  return hexStr2byteArray(hashHex);
}
function SHA256 ( msgBytes ) { let shaObj = new jsSHA ( "SHA-256" , "HEX" ) ; let msgHex = byteArray2hexStr ( msgBytes ) ; shaObj . update ( msgHex ) ; let hashHex = shaObj . getHash ( "HEX" ) ; return hexStr2byteArray ( hashHex ) ; }
return 32 bytes
return 32 bytes