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

16 lines 755 B
import { encodeGroupSecrets, decodeGroupSecrets } from "../../src/groupSecrets"; import { createRoundtripTest } from "./roundtrip"; describe("GroupSecrets roundtrip", () => { const roundtrip = createRoundtripTest(encodeGroupSecrets, decodeGroupSecrets); test("roundtrips minimal", () => { roundtrip({ joinerSecret: new Uint8Array([1]), pathSecret: undefined, psks: [] }); }); test("roundtrips nontrivial", () => { roundtrip({ joinerSecret: new Uint8Array([2, 3, 4]), pathSecret: new Uint8Array([5, 6, 7]), psks: [{ psktype: "external", pskId: new Uint8Array([8, 9, 10]), pskNonce: new Uint8Array([11, 12, 13, 14]) }], }); }); }); //# sourceMappingURL=groupSecrets.test.js.map