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

23 lines 938 B
import { encodeUpdatePathNode, decodeUpdatePathNode } from "../../src/updatePath"; import { createRoundtripTest } from "./roundtrip"; describe("UpdatePathNode roundtrip", () => { const roundtrip = createRoundtripTest(encodeUpdatePathNode, decodeUpdatePathNode); test("roundtrips minimal", () => { const node = { hpkePublicKey: new Uint8Array([1, 2, 3]), encryptedPathSecret: [], }; roundtrip(node); }); test("roundtrips nontrivial", () => { const node = { hpkePublicKey: new Uint8Array([4, 5, 6, 7, 8]), encryptedPathSecret: [ { ciphertext: new Uint8Array([9, 10, 11]), kemOutput: new Uint8Array([12, 13]) }, { ciphertext: new Uint8Array([14, 15, 16, 17]), kemOutput: new Uint8Array([18, 19, 20]) }, ], }; roundtrip(node); }); }); //# sourceMappingURL=updatePathNode.test.js.map