MCPcopy Index your code
hub / github.com/nodejs/node / c20pGenerateKey

Function c20pGenerateKey

lib/internal/crypto/chacha20_poly1305.js:48–60  ·  view source on GitHub ↗
(algorithm, extractable, usages)

Source from the content-addressed store, hash-verified

46}
47
48function c20pGenerateKey(algorithm, extractable, usages) {
49 const { name } = algorithm;
50
51 const usagesSet = validateUsagesNotEmpty(
52 validateKeyUsages(usages, kUsages, name));
53
54 return jobPromise(() => new SecretKeyGenJob(
55 kCryptoJobWebCrypto,
56 256,
57 { name },
58 getUsagesMask(usagesSet),
59 extractable));
60}
61
62function c20pImportKey(
63 algorithm,

Callers

nothing calls this directly

Calls 4

validateUsagesNotEmptyFunction · 0.85
validateKeyUsagesFunction · 0.85
jobPromiseFunction · 0.85
getUsagesMaskFunction · 0.85

Tested by

no test coverage detected