UNPKG

@baqhub/sdk

Version:

The official JavaScript SDK for the BAQ federated app platform.

16 lines (15 loc) 482 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Hash = void 0; const sha256_1 = require("@noble/hashes/sha256"); const utils_1 = require("@noble/hashes/utils"); function hashString(value) { return (0, utils_1.bytesToHex)((0, sha256_1.sha256)(value)); } function shortHashString(value) { return (0, utils_1.bytesToHex)((0, sha256_1.sha256)(value).slice(0, 16)); } exports.Hash = { hash: hashString, shortHash: shortHashString, };