UNPKG

ts-mls

Version:

[![CI](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml/badge.svg)](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/ts-mls.svg)](https://badge.fury.io/js/ts-mls) [![Coverage Status](https://co

10 lines 430 B
import { encodeVarLenData } from "../codec/variableLength.js"; import { concatUint8Arrays } from "../util/byteArray.js"; export function refhash(label, value, h) { return h.digest(encodeRefHash(label, value)); } function encodeRefHash(label, value) { const labelBytes = new TextEncoder().encode(label); return concatUint8Arrays(encodeVarLenData(labelBytes), encodeVarLenData(value)); } //# sourceMappingURL=hash.js.map