UNPKG

@stricahq/typhonjs

Version:

Pure JS Cardano Wallet library

16 lines (15 loc) 505 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hash28 = exports.hash32 = void 0; const buffer_1 = require("buffer"); const blakejs_1 = require("blakejs"); const hash32 = (data) => { const hash = (0, blakejs_1.blake2b)(data, undefined, 32); return buffer_1.Buffer.from(hash); }; exports.hash32 = hash32; const hash28 = (data) => { const hash = (0, blakejs_1.blake2b)(data, undefined, 28); return buffer_1.Buffer.from(hash); }; exports.hash28 = hash28;