Christian Risi 15bae1af19 V0.7.0 Arroyo Toad
Fixed a design flaw where we supposed we could find keys before reading part of the message by adding support for a method to grab the key at runtime
2024-12-14 11:51:28 +00:00

17 lines
392 B
TypeScript

import { deserializerV1, pem2_P256key } from "../src/mod.ts";
const testAssetFolder = "./testdata"
Deno.test(async function testV1() {
const _msg = (await Deno.readFile(`${testAssetFolder}/Message.bin`)).buffer
const mgs = await deserializerV1(_msg, async () => {
return await pem2_P256key(`${testAssetFolder}/public-key.pem`)
})
console.log(mgs.toString())
})