ts-mls
Version:
[](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [](https://badge.fury.io/js/ts-mls) [) {
test(`psk_secret test vectors ${index}`, async () => {
const impl = await getCiphersuiteImpl(getCiphersuiteFromId(x.cipher_suite));
await testPskSecret(x.psk_secret, x.psks, impl);
});
}
function toExternalPsk(p) {
return [{ psktype: "external", pskId: hexToBytes(p.psk_id), pskNonce: hexToBytes(p.psk_nonce) }, hexToBytes(p.psk)];
}
async function testPskSecret(secret, psks, impl) {
const computedSecret = await computePskSecret(psks.map(toExternalPsk), impl);
expect(bytesToHex(computedSecret)).toBe(secret);
}
//# sourceMappingURL=pskSecret.test.js.map