MCPcopy Create free account
hub / github.com/nodejs/node / assertJwk

Function assertJwk

test/parallel/test-crypto-pqc-key-objects-ml-dsa.js:32–37  ·  view source on GitHub ↗
(jwk)

Source from the content-addressed store, hash-verified

30 };
31
32 function assertJwk(jwk) {
33 assert.strictEqual(jwk.kty, 'AKP');
34 assert.strictEqual(jwk.alg, asymmetricKeyType.toUpperCase());
35 assert.ok(jwk.pub);
36 assert.strictEqual(Buffer.from(jwk.pub, 'base64url').byteLength, pubLen);
37 }
38
39 function assertPublicJwk(jwk) {
40 assertJwk(jwk);

Callers 2

assertPublicJwkFunction · 0.70
assertPrivateJwkFunction · 0.70

Calls 2

okMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected