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

26 lines 898 B
import { encodePskLabel, decodePskLabel } from "../../src/presharedkey"; import { createRoundtripTest } from "./roundtrip"; describe("PSKLabel roundtrip", () => { const roundtrip = createRoundtripTest(encodePskLabel, decodePskLabel); test("roundtrips minimal", () => { roundtrip({ id: { psktype: "external", pskId: new Uint8Array([1]), pskNonce: new Uint8Array([2, 3, 4, 5]) }, index: 0, count: 1, }); }); test("roundtrips nontrivial", () => { roundtrip({ id: { psktype: "resumption", usage: "application", pskGroupId: new Uint8Array([6, 7, 8]), pskEpoch: 123n, pskNonce: new Uint8Array([9, 10, 11, 12]), }, index: 5, count: 10, }); }); }); //# sourceMappingURL=pskLabel.test.js.map