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

30 lines 1.07 kB
import { encodePrivateContentAAD, decodePrivateContentAAD } from "../../src/privateMessage"; import { createRoundtripTest } from "./roundtrip"; describe("PrivateContentAAD roundtrip", () => { const roundtrip = createRoundtripTest(encodePrivateContentAAD, decodePrivateContentAAD); test("roundtrips application", () => { roundtrip({ groupId: new Uint8Array([1]), epoch: 0n, contentType: "application", authenticatedData: new Uint8Array([2]), }); }); test("roundtrips commit", () => { roundtrip({ groupId: new Uint8Array([3, 4, 5]), epoch: 123n, contentType: "commit", authenticatedData: new Uint8Array([6, 7, 8]), }); }); test("roundtrips proposal", () => { roundtrip({ groupId: new Uint8Array([3, 4, 5]), epoch: 123n, contentType: "proposal", authenticatedData: new Uint8Array([6, 7, 8]), }); }); }); //# sourceMappingURL=privateContentAAD.test.js.map