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

25 lines 961 B
import { encodeWelcome, decodeWelcome } from "../../src/welcome"; import { createRoundtripTest } from "./roundtrip"; describe("Welcome roundtrip", () => { const roundtrip = createRoundtripTest(encodeWelcome, decodeWelcome); test("roundtrips minimal", () => { roundtrip({ cipherSuite: "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519", secrets: [], encryptedGroupInfo: new Uint8Array([1]), }); }); test("roundtrips nontrivial", () => { roundtrip({ cipherSuite: "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519", secrets: [ { newMember: new Uint8Array([2, 3]), encryptedGroupSecrets: { kemOutput: new Uint8Array([4]), ciphertext: new Uint8Array([5, 6]) }, }, ], encryptedGroupInfo: new Uint8Array([7, 8, 9]), }); }); }); //# sourceMappingURL=welcome.test.js.map