UNPKG

hapi-ton-sdk

Version:

SDK for managing HAPI attestations on TON network

45 lines (44 loc) 1.45 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/utils/crc32.ts var crc32_exports = {}; __export(crc32_exports, { crc32: () => crc32 }); module.exports = __toCommonJS(crc32_exports); function crc32(str) { const table = new Int32Array(256); for (let i = 0; i < 256; i++) { let c = i; for (let j = 0; j < 8; j++) { c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; } table[i] = c; } let crc = -1; for (let i = 0; i < str.length; i++) { crc = crc >>> 8 ^ table[(crc ^ str.charCodeAt(i)) & 255]; } return (crc ^ -1) >>> 0; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { crc32 }); //# sourceMappingURL=crc32.js.map